From 1dd869116719a20f503e05f3b01cddb8b0c97ed6 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 23 Jul 2016 11:30:20 +0200 Subject: Fix auto palette when using extensions (bzr r15019) --- src/document-undo.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/document-undo.cpp') diff --git a/src/document-undo.cpp b/src/document-undo.cpp index eb0ac7707..c27904ea8 100644 --- a/src/document-undo.cpp +++ b/src/document-undo.cpp @@ -196,6 +196,7 @@ void Inkscape::DocumentUndo::cancel(SPDocument *doc) if (doc->priv->partial) { sp_repr_undo_log (doc->priv->partial); + doc->emitReconstructionFinish(); sp_repr_free_log (doc->priv->partial); doc->priv->partial = NULL; } @@ -222,6 +223,8 @@ static void perform_document_update(SPDocument &doc) { doc.ensureUpToDate(); Inkscape::XML::Event *update_log=sp_repr_commit_undoable(doc.rdoc); + doc.emitReconstructionFinish(); + if (update_log != NULL) { g_warning("Document was modified while being updated after undo operation"); sp_repr_debug_print_log(update_log); @@ -322,8 +325,10 @@ gboolean Inkscape::DocumentUndo::redo(SPDocument *doc) doc->priv->sensitive = TRUE; doc->priv->seeking = false; - if (ret) + if (ret) { INKSCAPE.external_change(); + doc->emitReconstructionFinish(); + } return ret; } -- cgit v1.2.3 From f35bb1f74a0ffeb5c6477a25e3c4cde87a97bcf1 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 12:06:06 +0200 Subject: Removed unused includes, decrease compilation time (bzr r15025) --- src/document-undo.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/document-undo.cpp') diff --git a/src/document-undo.cpp b/src/document-undo.cpp index c27904ea8..113d09d66 100644 --- a/src/document-undo.cpp +++ b/src/document-undo.cpp @@ -45,7 +45,6 @@ */ #include -#include #include "xml/repr.h" #include "document-private.h" #include "inkscape.h" -- cgit v1.2.3 From 43b49e325db73cc19b1731db6c69545664ee8fbe Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Thu, 28 Jul 2016 13:26:17 +0200 Subject: Reverted changes to r15024 after many building problems (bzr r15027) --- src/document-undo.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/document-undo.cpp') diff --git a/src/document-undo.cpp b/src/document-undo.cpp index 113d09d66..c27904ea8 100644 --- a/src/document-undo.cpp +++ b/src/document-undo.cpp @@ -45,6 +45,7 @@ */ #include +#include #include "xml/repr.h" #include "document-private.h" #include "inkscape.h" -- cgit v1.2.3 From 35830f456cadaecf8b8e3944e3031a1a93f6cb41 Mon Sep 17 00:00:00 2001 From: Adrian Boguszewski Date: Wed, 3 Aug 2016 15:29:38 +0200 Subject: Removed unused includes, decreased compilation time. Once again (bzr r15034) --- src/document-undo.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/document-undo.cpp') diff --git a/src/document-undo.cpp b/src/document-undo.cpp index c27904ea8..113d09d66 100644 --- a/src/document-undo.cpp +++ b/src/document-undo.cpp @@ -45,7 +45,6 @@ */ #include -#include #include "xml/repr.h" #include "document-private.h" #include "inkscape.h" -- cgit v1.2.3 From c7f5c676fa15f59f5f78c934263539981a26bbd2 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Mon, 10 Oct 2016 14:08:35 +0200 Subject: Fix some canvas problems and refactorization (bzr r15142.1.8) --- src/document-undo.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/document-undo.cpp') diff --git a/src/document-undo.cpp b/src/document-undo.cpp index 113d09d66..023843fcc 100644 --- a/src/document-undo.cpp +++ b/src/document-undo.cpp @@ -281,6 +281,10 @@ gboolean Inkscape::DocumentUndo::undo(SPDocument *doc) if (ret) INKSCAPE.external_change(); + SPObject *updated = doc->getRoot(); + if (updated) { + updated->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); + } return ret; } -- cgit v1.2.3 From b949d0bdb9f751a94fd71f8bab7610d9a6a11a90 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Mon, 10 Oct 2016 16:06:22 +0200 Subject: Fix some canvas item problems and refresh items on rotate (bzr r15142.1.10) --- src/document-undo.cpp | 51 +++++++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 26 deletions(-) (limited to 'src/document-undo.cpp') diff --git a/src/document-undo.cpp b/src/document-undo.cpp index 023843fcc..ae90c916e 100644 --- a/src/document-undo.cpp +++ b/src/document-undo.cpp @@ -240,53 +240,52 @@ static void perform_document_update(SPDocument &doc) { gboolean Inkscape::DocumentUndo::undo(SPDocument *doc) { - using Inkscape::Debug::EventTracker; - using Inkscape::Debug::SimpleEvent; + using Inkscape::Debug::EventTracker; + using Inkscape::Debug::SimpleEvent; - gboolean ret; + gboolean ret; - EventTracker > tracker("undo"); + EventTracker > tracker("undo"); - g_assert (doc != NULL); - g_assert (doc->priv != NULL); - g_assert (doc->priv->sensitive); + g_assert (doc != NULL); + g_assert (doc->priv != NULL); + g_assert (doc->priv->sensitive); - doc->priv->sensitive = FALSE; + doc->priv->sensitive = FALSE; doc->priv->seeking = true; - doc->actionkey.clear(); + doc->actionkey.clear(); - finish_incomplete_transaction(*doc); + finish_incomplete_transaction(*doc); - if (! doc->priv->undo.empty()) { - Inkscape::Event *log = doc->priv->undo.back(); - doc->priv->undo.pop_back(); - sp_repr_undo_log (log->event); - perform_document_update(*doc); + if (! doc->priv->undo.empty()) { + Inkscape::Event *log = doc->priv->undo.back(); + doc->priv->undo.pop_back(); + sp_repr_undo_log (log->event); + perform_document_update(*doc); - doc->priv->redo.push_back(log); + doc->priv->redo.push_back(log); doc->setModifiedSinceSave(); doc->priv->undoStackObservers.notifyUndoEvent(log); - ret = TRUE; - } else { - ret = FALSE; - } + ret = TRUE; + } else { + ret = FALSE; + } - sp_repr_begin_transaction (doc->rdoc); + sp_repr_begin_transaction (doc->rdoc); - doc->priv->sensitive = TRUE; + doc->priv->sensitive = TRUE; doc->priv->seeking = false; - if (ret) - INKSCAPE.external_change(); + if (ret) INKSCAPE.external_change(); + SPObject *updated = doc->getRoot(); if (updated) { updated->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); } - - return ret; + return ret; } gboolean Inkscape::DocumentUndo::redo(SPDocument *doc) -- cgit v1.2.3 From 167cadcab37209a059f6f8c84c0d897258bfc64d Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Mon, 6 Mar 2017 22:33:07 +0100 Subject: Fixes bug Envelope Deformation LPE makes Inkscape fail to undo properly Fixed bugs: - https://launchpad.net/bugs/1668003 (bzr r15571) --- src/document-undo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/document-undo.cpp') diff --git a/src/document-undo.cpp b/src/document-undo.cpp index ae90c916e..fb1f47312 100644 --- a/src/document-undo.cpp +++ b/src/document-undo.cpp @@ -282,7 +282,7 @@ gboolean Inkscape::DocumentUndo::undo(SPDocument *doc) if (ret) INKSCAPE.external_change(); SPObject *updated = doc->getRoot(); - if (updated) { + if (updated && !ret) { updated->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); } return ret; -- cgit v1.2.3 From f47466c701b2256b2ce232f6d311d2be47136eab Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 20 Mar 2017 21:12:31 +0100 Subject: Implement rotation via desktop to window affine. Remove rotation via viewbox. Still some work to do... (bzr r15603) --- src/document-undo.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/document-undo.cpp') diff --git a/src/document-undo.cpp b/src/document-undo.cpp index fb1f47312..f36010602 100644 --- a/src/document-undo.cpp +++ b/src/document-undo.cpp @@ -281,10 +281,6 @@ gboolean Inkscape::DocumentUndo::undo(SPDocument *doc) if (ret) INKSCAPE.external_change(); - SPObject *updated = doc->getRoot(); - if (updated && !ret) { - updated->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG); - } return ret; } -- cgit v1.2.3