summaryrefslogtreecommitdiffstats
path: root/src/widgets/toolbox.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2010-05-16 18:52:17 +0000
committertavmjong-free <tavmjong@free.fr>2010-05-16 18:52:17 +0000
commitae12f6dcaa6a8214bcea75c3f9219ec7d2473189 (patch)
tree28fb8aa2ca6dc16a42c75b1503bcf549d2f03e64 /src/widgets/toolbox.cpp
parentTranslations. Dutch translation update by Kris. (diff)
downloadinkscape-ae12f6dcaa6a8214bcea75c3f9219ec7d2473189.tar.gz
inkscape-ae12f6dcaa6a8214bcea75c3f9219ec7d2473189.zip
Text toolbar:
Write out deprecated sodipodi:linespacing attribute (otherwise new line-height value gets overwritten by old linespacing value if text duplicated). "Fixes" 575829. Add calls to sp_document_maybe_done for dx, dy, rotate attributes. (bzr r9424)
Diffstat (limited to 'src/widgets/toolbox.cpp')
-rw-r--r--src/widgets/toolbox.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp
index 62af61943..2c129f02c 100644
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -6776,6 +6776,16 @@ static void sp_text_lineheight_value_changed( GtkAdjustment *adj, GObject *tbl )
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
sp_desktop_set_style (desktop, css, true, true);
+
+ // Until deprecated sodipodi:linespacing purged:
+ Inkscape::Selection *selection = sp_desktop_selection(desktop);
+ GSList const *items = selection->itemList();
+ for (; items != NULL; items = items->next) {
+ if (SP_IS_TEXT (items->data)) {
+ SP_OBJECT_REPR(items->data)->setAttribute("sodipodi:linespacing", sp_repr_css_property (css, "line-height", NULL));
+ }
+ }
+
// Save for undo
sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "ttb:line-height", SP_VERB_NONE,
_("Text: Change line-height"));
@@ -6899,6 +6909,10 @@ static void sp_text_dx_value_changed( GtkAdjustment *adj, GObject *tbl )
}
}
+ // Save for undo
+ sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "ttb:dx", SP_VERB_NONE,
+ _("Text: Change dx (kern)"));
+
g_object_set_data( tbl, "freeze", GINT_TO_POINTER(FALSE) );
}
@@ -6926,6 +6940,10 @@ static void sp_text_dy_value_changed( GtkAdjustment *adj, GObject *tbl )
}
}
+ // Save for undo
+ sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "ttb:dy", SP_VERB_NONE,
+ _("Text: Change dy"));
+
g_object_set_data( tbl, "freeze", GINT_TO_POINTER(FALSE) );
}
@@ -6953,6 +6971,10 @@ static void sp_text_rotation_value_changed( GtkAdjustment *adj, GObject *tbl )
}
}
+ // Save for undo
+ sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "ttb:rotate", SP_VERB_NONE,
+ _("Text: Change rotate"));
+
g_object_set_data( tbl, "freeze", GINT_TO_POINTER(FALSE) );
}