diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2013-03-19 07:01:10 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2013-03-19 07:01:10 +0000 |
| commit | 4002d292bbb499304af30bc060ce0200481062b8 (patch) | |
| tree | f43e785df061301652b89800183647bd56bbac55 /src/desktop.cpp | |
| parent | Drop remaining unused functions (diff) | |
| download | inkscape-4002d292bbb499304af30bc060ce0200481062b8.tar.gz inkscape-4002d292bbb499304af30bc060ce0200481062b8.zip | |
Partial fix for Bug #1071082 (Undo History doesn't work if open before file is opened) by vaifrax.
(bzr r12225)
Diffstat (limited to 'src/desktop.cpp')
| -rw-r--r-- | src/desktop.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp index c7a763ae1..d74e8fdad 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -1582,6 +1582,13 @@ SPDesktop::setDocument (SPDocument *doc) _layer_hierarchy->connectChanged(sigc::bind(sigc::ptr_fun(_layer_hierarchy_changed), this)); _layer_hierarchy->setTop(doc->getRoot()); + // remove old EventLog if it exists (see also: bug #1071082) + if (event_log) { + doc->removeUndoObserver(*event_log); + delete event_log; + event_log = 0; + } + /* setup EventLog */ event_log = new Inkscape::EventLog(doc); doc->addUndoObserver(*event_log); |
