diff options
| author | John Smith <john.smith7545@yahoo.com> | 2012-08-27 23:38:32 +0000 |
|---|---|---|
| committer | John Smith <john.smith7545@yahoo.com> | 2012-08-27 23:38:32 +0000 |
| commit | f310b8a4afc65d685f69446323ba6e4b99ba60ce (patch) | |
| tree | fe2b2b6ea95274d287b98a9155acc72044aab39f /src | |
| parent | Fix for 168446 : rename menu item Export to PNG Image (diff) | |
| download | inkscape-f310b8a4afc65d685f69446323ba6e4b99ba60ce.tar.gz inkscape-f310b8a4afc65d685f69446323ba6e4b99ba60ce.zip | |
Fix for 525597 : Undo History dialog not updating when switching windows
(bzr r11624)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/dialog/undo-history.cpp | 11 | ||||
| -rw-r--r-- | src/ui/dialog/undo-history.h | 7 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/ui/dialog/undo-history.cpp b/src/ui/dialog/undo-history.cpp index 52d160124..73b76054e 100644 --- a/src/ui/dialog/undo-history.cpp +++ b/src/ui/dialog/undo-history.cpp @@ -159,7 +159,11 @@ UndoHistory::UndoHistory() _document (sp_desktop_document(getDesktop())), _event_log (getDesktop() ? getDesktop()->event_log : NULL), _columns (_event_log ? &_event_log->getColumns() : NULL), - _event_list_selection (_event_list_view.get_selection()) + _event_list_selection (_event_list_view.get_selection()), + _desktop(NULL), + _deskTrack(), + _desktopChangeConn() + { if ( !_document || !_event_log || !_columns ) return; @@ -216,6 +220,9 @@ UndoHistory::UndoHistory() // connect with the EventLog _event_log->connectWithDialog(&_event_list_view, &_callback_connections); + _desktopChangeConn = _deskTrack.connectDesktopChanged( sigc::mem_fun(*this, &UndoHistory::setDesktop) ); + _deskTrack.connect(GTK_WIDGET(gobj())); + show_all_children(); // scroll to the selected row @@ -224,8 +231,10 @@ UndoHistory::UndoHistory() UndoHistory::~UndoHistory() { + _desktopChangeConn.disconnect(); } + void UndoHistory::_onListSelectionChange() { diff --git a/src/ui/dialog/undo-history.h b/src/ui/dialog/undo-history.h index f6bca30b7..adf4f1936 100644 --- a/src/ui/dialog/undo-history.h +++ b/src/ui/dialog/undo-history.h @@ -24,6 +24,7 @@ #include "event-log.h" #include "widgets/icon.h" +#include "ui/dialog/desktop-tracker.h" class SPDesktop; @@ -67,6 +68,7 @@ private: Glib::Property<Glib::RefPtr<Gdk::Pixbuf> > _property_icon; Glib::Property<unsigned int> _property_event_type; std::map<const unsigned int, Glib::RefPtr<Gdk::Pixbuf> > _icon_cache; + }; @@ -135,6 +137,7 @@ protected: SPDocument *_document; EventLog *_event_log; + const EventLog::EventModelColumns *_columns; Gtk::ScrolledWindow _scrolled_window; @@ -143,6 +146,10 @@ protected: Gtk::TreeView _event_list_view; Glib::RefPtr<Gtk::TreeSelection> _event_list_selection; + SPDesktop *_desktop; + DesktopTracker _deskTrack; + sigc::connection _desktopChangeConn; + EventLog::CallbackMap _callback_connections; void _onListSelectionChange(); |
