summaryrefslogtreecommitdiffstats
path: root/src/widgets/text-toolbar.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2015-04-29 20:51:23 +0000
committerMarc Jeanmougin <mc@M0nst3r.bouyguesbox.fr>2015-04-29 20:51:23 +0000
commit5163b1155c85c040b55f28c771f6d12bcd483765 (patch)
tree79afe1546f86f49fe1dc8fd625e125c0646bc59b /src/widgets/text-toolbar.cpp
parentmerge with trunk (diff)
parentBetter solution picking (diff)
downloadinkscape-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.cpp14
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