diff options
| author | Milosz Derezynski <mderezynski@gmail.com> | 2006-05-22 10:43:18 +0000 |
|---|---|---|
| committer | mderezynski <mderezynski@users.sourceforge.net> | 2006-05-22 10:43:18 +0000 |
| commit | cb134750e34cf76c3dc805b869caf7b3675a3c16 (patch) | |
| tree | 89f397af02e945e20fe93e68c3dfbd608ef39b11 /src/widgets/toolbox.cpp | |
| parent | * Apply style to selection also when applying it to defaults (diff) | |
| download | inkscape-cb134750e34cf76c3dc805b869caf7b3675a3c16.tar.gz inkscape-cb134750e34cf76c3dc805b869caf7b3675a3c16.zip | |
* Remember default setting for alingment
(bzr r943)
Diffstat (limited to 'src/widgets/toolbox.cpp')
| -rw-r--r-- | src/widgets/toolbox.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 2d2cd801b..e67c39cc1 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -3072,6 +3072,17 @@ namespace { } } + SPStyle *query = + sp_style_new (); + int result_numbers = + sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONTNUMBERS); + + // If querying returned nothing, read the style from the text tool prefs (default style for new texts) + if (result_numbers == QUERY_STYLE_NOTHING) + { + sp_repr_css_change (inkscape_get_repr (INKSCAPE, "tools.text"), css, "style"); + } + sp_desktop_set_style (desktop, css, true, true); sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP)); sp_repr_css_attr_unref (css); |
