diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-06-27 01:14:33 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-06-27 01:14:33 +0000 |
| commit | 6306c880f0c24d3f742c266be532025ab699a1a4 (patch) | |
| tree | 7cca94719138d9d850864f2a071d71ae48aa2362 /src/widgets/toolbox.cpp | |
| parent | fix style querying: now all objects have style, so to go up from SPStrings we... (diff) | |
| download | inkscape-6306c880f0c24d3f742c266be532025ab699a1a4.tar.gz inkscape-6306c880f0c24d3f742c266be532025ab699a1a4.zip | |
unref temporary styles properly
(bzr r3113)
Diffstat (limited to 'src/widgets/toolbox.cpp')
| -rw-r--r-- | src/widgets/toolbox.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 0ae1c812c..c15337e0d 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -3155,7 +3155,6 @@ bool visible = false; void sp_text_toolbox_selection_changed (Inkscape::Selection *selection, GObject *tbl) { - SPStyle *query = sp_style_new (); @@ -3303,6 +3302,8 @@ sp_text_toolbox_selection_changed (Inkscape::Selection *selection, GObject *tbl) g_object_set_data (G_OBJECT (button), "block", gpointer(0)); g_object_set_data (G_OBJECT (button1), "block", gpointer(0)); } + + sp_style_unref(query); } void @@ -3368,6 +3369,8 @@ sp_text_toolbox_family_changed (GtkTreeSelection *selection, sp_desktop_set_style (desktop, css, true, true); } + sp_style_unref(query); + sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT, _("Text: Change font family")); sp_repr_css_attr_unref (css); @@ -3450,6 +3453,8 @@ sp_text_toolbox_anchoring_toggled (GtkRadioButton *button, sp_repr_css_change (inkscape_get_repr (INKSCAPE, "tools.text"), css, "style"); } + sp_style_unref(query); + sp_desktop_set_style (desktop, css, true, true); sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT, _("Text: Change alignment")); @@ -3496,6 +3501,8 @@ sp_text_toolbox_style_toggled (GtkToggleButton *button, sp_repr_css_change (inkscape_get_repr (INKSCAPE, "tools.text"), css, "style"); } + sp_style_unref(query); + sp_desktop_set_style (desktop, css, true, true); sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT, _("Text: Change font style")); @@ -3639,6 +3646,8 @@ sp_text_toolbox_size_changed (GtkComboBox *cbox, sp_repr_css_change (inkscape_get_repr (INKSCAPE, "tools.text"), css, "style"); } + sp_style_unref(query); + sp_desktop_set_style (desktop, css, true, true); sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "ttb:size", SP_VERB_NONE, _("Text: Change font size")); |
