summaryrefslogtreecommitdiffstats
path: root/src/widgets/text-toolbar.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-08-17 02:47:53 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-08-17 02:47:53 +0000
commit2a2db8af11c2e518bd7bfe520e2f88a7e439d939 (patch)
treebdbf9071af198a9b54d698eef9d6a1b77f857d73 /src/widgets/text-toolbar.cpp
parentAdd 'Show handles' LPE (diff)
downloadinkscape-2a2db8af11c2e518bd7bfe520e2f88a7e439d939.tar.gz
inkscape-2a2db8af11c2e518bd7bfe520e2f88a7e439d939.zip
Merge in font-speedup branch to improve launch times
(bzr r13341.1.140)
Diffstat (limited to 'src/widgets/text-toolbar.cpp')
-rw-r--r--src/widgets/text-toolbar.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp
index 408babf06..88f698bc4 100644
--- a/src/widgets/text-toolbar.cpp
+++ b/src/widgets/text-toolbar.cpp
@@ -819,7 +819,7 @@ static void sp_text_set_sizes(GtkListStore* model_size, int unit)
* It is called whenever a text selection is changed, including stepping cursor
* through text, or setting focus to text.
*/
-static void sp_text_toolbox_selection_changed(Inkscape::Selection */*selection*/, GObject *tbl)
+static void sp_text_toolbox_selection_changed(Inkscape::Selection */*selection*/, GObject *tbl, bool subselection = false) // don't bother to update font list if subsel changed
{
#ifdef DEBUG_TEXT
static int count = 0;
@@ -859,7 +859,9 @@ static void sp_text_toolbox_selection_changed(Inkscape::Selection */*selection*/
INK_COMBOBOXENTRY_ACTION( g_object_get_data( tbl, "TextFontStyleAction" ) );
Inkscape::FontLister* fontlister = Inkscape::FontLister::get_instance();
- fontlister->update_font_list( sp_desktop_document( SP_ACTIVE_DESKTOP ));
+ if (!subselection) {
+ fontlister->update_font_list( sp_desktop_document( SP_ACTIVE_DESKTOP ));
+ }
fontlister->selection_update();
// Update font list, but only if widget already created.
@@ -1154,7 +1156,7 @@ static void sp_text_toolbox_selection_modified(Inkscape::Selection *selection, g
static void
sp_text_toolbox_subselection_changed (gpointer /*tc*/, GObject *tbl)
{
- sp_text_toolbox_selection_changed (NULL, tbl);
+ sp_text_toolbox_selection_changed (NULL, tbl, true);
}
// TODO: possibly share with font-selector by moving most code to font-lister (passing family name)
@@ -1640,7 +1642,7 @@ static void text_toolbox_watch_ec(SPDesktop* desktop, Inkscape::UI::Tools::ToolB
if (SP_IS_TEXT_CONTEXT(ec)) {
// Watch selection
- c_selection_changed = sp_desktop_selection(desktop)->connectChanged(bind(ptr_fun(sp_text_toolbox_selection_changed), holder));
+ c_selection_changed = sp_desktop_selection(desktop)->connectChanged(bind(ptr_fun(sp_text_toolbox_selection_changed), holder, false));
c_selection_modified = sp_desktop_selection (desktop)->connectModified(bind(ptr_fun(sp_text_toolbox_selection_modified), holder));
c_subselection_changed = desktop->connectToolSubselectionChanged(bind(ptr_fun(sp_text_toolbox_subselection_changed), holder));
} else {