diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2015-04-29 20:51:23 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <mc@M0nst3r.bouyguesbox.fr> | 2015-04-29 20:51:23 +0000 |
| commit | 5163b1155c85c040b55f28c771f6d12bcd483765 (patch) | |
| tree | 79afe1546f86f49fe1dc8fd625e125c0646bc59b /src/widgets/text-toolbar.cpp | |
| parent | merge with trunk (diff) | |
| parent | Better solution picking (diff) | |
| download | inkscape-5163b1155c85c040b55f28c771f6d12bcd483765.tar.gz inkscape-5163b1155c85c040b55f28c771f6d12bcd483765.zip | |
updated with trunk
(bzr r13922.1.19)
Diffstat (limited to 'src/widgets/text-toolbar.cpp')
| -rw-r--r-- | src/widgets/text-toolbar.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp index 2160cad2e..7b22e4af7 100644 --- a/src/widgets/text-toolbar.cpp +++ b/src/widgets/text-toolbar.cpp @@ -162,11 +162,17 @@ static void sp_text_fontfamily_value_changed( Ink_ComboBoxEntry_Action *act, GOb fontlister->fill_css( css ); SPDesktop *desktop = SP_ACTIVE_DESKTOP; - sp_desktop_set_style (desktop, css, true, true); // Results in selection change called twice. + if( desktop->getSelection()->isEmpty() ) { + // Update default + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + prefs->mergeStyle("/tools/text/style", css); + } else { + // If there is a selection, update + sp_desktop_set_style (desktop, css, true, true); // Results in selection change called twice. + DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_TEXT, + _("Text: Change font family")); + } sp_repr_css_attr_unref (css); - - DocumentUndo::done(desktop->getDocument(), SP_VERB_CONTEXT_TEXT, - _("Text: Change font family")); } // unfreeze |
