From e9d7e78e43ccfe0feda34998d31d921138232da6 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 5 Sep 2016 15:44:11 +0200 Subject: Fix history handling for previous commit. (bzr r15107) --- src/widgets/text-toolbar.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/widgets/text-toolbar.cpp') diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp index 0ce2db4b2..4b22c8d7e 100644 --- a/src/widgets/text-toolbar.cpp +++ b/src/widgets/text-toolbar.cpp @@ -565,17 +565,18 @@ static void sp_text_lineheight_value_changed( GtkAdjustment *adj, GObject *tbl ) // Save for undo if(modmade) { - DocumentUndo::maybeDone(SP_ACTIVE_DESKTOP->getDocument(), "ttb:line-height", SP_VERB_NONE, - _("Text: Change line-height")); - // Call to Document::maybeDone() causes rebuild of text layout (with all proper style + // Call ensureUpToDate() causes rebuild of text layout (with all proper style // cascading, etc.). For multi-line text with sodipodi::role="line", we must explicitly // save new 'x' and 'y' attribute values by calling updateRepr(). // Partial fix for bug #1590141. + desktop->getDocument()->ensureUpToDate(); for(auto i=itemlist.begin();i!=itemlist.end(); ++i){ if (SP_IS_TEXT (*i)) { (*i)->updateRepr(); } } + DocumentUndo::maybeDone(SP_ACTIVE_DESKTOP->getDocument(), "ttb:line-height", SP_VERB_NONE, + _("Text: Change line-height")); } // If no selected objects, set default. -- cgit v1.2.3