summaryrefslogtreecommitdiffstats
path: root/src/desktop.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-02-28 18:36:08 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-02-28 18:36:08 +0000
commit5974e91ff387b44b30434d3a2ede5f1ea6791a7c (patch)
tree93c062f10f51d6ea670d716d49b5c5883181e055 /src/desktop.cpp
parentupdate to trunk (diff)
parentSpray tool: (diff)
downloadinkscape-5974e91ff387b44b30434d3a2ede5f1ea6791a7c.tar.gz
inkscape-5974e91ff387b44b30434d3a2ede5f1ea6791a7c.zip
update to trunk
(bzr r11950.1.259)
Diffstat (limited to 'src/desktop.cpp')
-rw-r--r--src/desktop.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 364b5e930..a02baeac8 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -52,6 +52,7 @@
#include "display/sp-canvas.h"
#include "display/sp-canvas-util.h"
#include "document.h"
+#include "document-undo.h"
#include "event-log.h"
#include "helper/action-context.h"
#include "interface.h"
@@ -167,8 +168,23 @@ SPDesktop::init (SPNamedView *nv, SPCanvas *aCanvas, Inkscape::UI::View::EditWid
canvas = aCanvas;
SPDocument *document = namedview->document;
- /* Kill flicker */
+ /* XXX:
+ * ensureUpToDate() sends a 'modified' signal to the root element.
+ * This is reportedly required to prevent flickering after the document
+ * loads. However, many SPObjects write to their repr in response
+ * to this signal. This is apparently done to support live path effects,
+ * which rewrite their result paths after each modification of the base object.
+ * This causes the generation of an incomplete undo transaction,
+ * which causes problems down the line, including crashes in the
+ * Undo History dialog.
+ *
+ * For now, this is handled by disabling undo tracking during this call.
+ * A proper fix would involve modifying the way ensureUpToDate() works,
+ * so that the LPE results are not rewritten.
+ */
+ Inkscape::DocumentUndo::setUndoSensitive(document, false);
document->ensureUpToDate();
+ Inkscape::DocumentUndo::setUndoSensitive(document, true);
/* Setup Dialog Manager */
_dlg_mgr = &Inkscape::UI::Dialog::DialogManager::getInstance();