summaryrefslogtreecommitdiffstats
path: root/src/widgets/font-selector.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2014-10-15 18:01:50 +0000
committertavmjong-free <tavmjong@free.fr>2014-10-15 18:01:50 +0000
commit83e50305d77a98329ea2085f90b6a9f154e1509f (patch)
tree44c1525e2fb5488c702308dd0e3e7e60c67326e2 /src/widgets/font-selector.cpp
parentFix build (diff)
downloadinkscape-83e50305d77a98329ea2085f90b6a9f154e1509f.tar.gz
inkscape-83e50305d77a98329ea2085f90b6a9f154e1509f.zip
LiamW's initial font caching work.
(bzr r13616.1.1)
Diffstat (limited to 'src/widgets/font-selector.cpp')
-rw-r--r--src/widgets/font-selector.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp
index f00f05768..327349844 100644
--- a/src/widgets/font-selector.cpp
+++ b/src/widgets/font-selector.cpp
@@ -304,6 +304,9 @@ static void sp_font_selector_family_select_row(GtkTreeSelection *selection,
GtkTreeModel *model;
GtkTreeIter iter;
if (!gtk_tree_selection_get_selected (selection, &model, &iter)) return;
+
+ Inkscape::FontLister *fontlister = Inkscape::FontLister::get_instance();
+ fontlister->ensureRowStyles(model, &iter);
// Next get family name with its style list
gchar *family;
@@ -311,7 +314,6 @@ static void sp_font_selector_family_select_row(GtkTreeSelection *selection,
gtk_tree_model_get (model, &iter, 0, &family, 1, &list, -1);
// Find best style match for selected family with current style (e.g. of selected text).
- Inkscape::FontLister *fontlister = Inkscape::FontLister::get_instance();
Glib::ustring style = fontlister->get_font_style();
Glib::ustring best = fontlister->get_best_style_match (family, style);