From 4bcca9f2bf8e89d1589833112a51d5db45225037 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 5 Sep 2016 14:56:53 +0200 Subject: Save new 'x' and 'y' attribute values when 'line-height' changed. Partial fix for bug #1590141. (bzr r15106) --- src/widgets/text-toolbar.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/widgets/text-toolbar.cpp') diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp index 0160bcac7..0ce2db4b2 100644 --- a/src/widgets/text-toolbar.cpp +++ b/src/widgets/text-toolbar.cpp @@ -567,6 +567,15 @@ static void sp_text_lineheight_value_changed( GtkAdjustment *adj, GObject *tbl ) 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 + // 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. + for(auto i=itemlist.begin();i!=itemlist.end(); ++i){ + if (SP_IS_TEXT (*i)) { + (*i)->updateRepr(); + } + } } // If no selected objects, set default. -- cgit v1.2.3