summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e9066bf)
raw | patch | inline | side by side (parent: e9066bf)
author | tavmjong-free <tavmjong@free.fr> | |
Sun, 16 May 2010 18:52:17 +0000 (20:52 +0200) | ||
committer | tavmjong-free <tavmjong@free.fr> | |
Sun, 16 May 2010 18:52:17 +0000 (20:52 +0200) |
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.
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.
src/widgets/toolbox.cpp | patch | blob | history |
index 62af61943c1f5238c455eb873c17a594e985628d..2c129f02cdc43855164e427d7ea77886d2b36d5e 100644 (file)
--- 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"));
}
}
+ // 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) );
}
}
}
+ // 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) );
}