=== modified file 'src/libnrtype/FontFactory.h' --- src/libnrtype/FontFactory.h 2014-10-15 18:17:43 +0000 +++ src/libnrtype/FontFactory.h 2015-04-30 00:26:08 +0000 @@ -68,7 +68,7 @@ }; // Map type for gathering UI family and style names -typedef std::map > FamilyToStylesMap; +// typedef std::map > FamilyToStylesMap; class font_factory { public: === modified file 'src/widgets/text-toolbar.cpp' --- src/widgets/text-toolbar.cpp 2014-10-15 18:01:50 +0000 +++ src/widgets/text-toolbar.cpp 2015-04-30 00:33:29 +0000 @@ -162,11 +162,17 @@ 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(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT, + _("Text: Change font family")); + } sp_repr_css_attr_unref (css); - - DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT, - _("Text: Change font family")); } // unfreeze