summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2010-04-03 09:28:11 +0000
committerJon A. Cruz <jon@joncruz.org>2010-04-03 09:28:11 +0000
commit66cf0e990e566d1324370fe9b68db0e63cee97ab (patch)
treef293997f32daaa1cc1f3b64c5d5d1c2fad9677f0 /src
parentWin32 uninstaller: remove empty directory lib/locale (diff)
downloadinkscape-66cf0e990e566d1324370fe9b68db0e63cee97ab.tar.gz
inkscape-66cf0e990e566d1324370fe9b68db0e63cee97ab.zip
Disconnect Glyphs UI while updating the model. 5X+ performance boost on CJK fonts. Partially fixes bug #553911.
Fixed bugs: - https://launchpad.net/bugs/553911 (bzr r9286)
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/glyphs.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ui/dialog/glyphs.cpp b/src/ui/dialog/glyphs.cpp
index 8677bcda2..133cf01ea 100644
--- a/src/ui/dialog/glyphs.cpp
+++ b/src/ui/dialog/glyphs.cpp
@@ -377,6 +377,10 @@ void GlyphsPanel::rebuild()
}
#endif // GLIB_CHECK_VERSION(2,14,0)
+ // Disconnect the model while we update it. Simple work-around for 5x+ performance boost.
+ Glib::RefPtr<Gtk::ListStore> tmp = Gtk::ListStore::create(*getColumns());
+ iconView->set_model(tmp);
+
std::vector<gunichar> present;
for (gunichar ch = 1; ch < 65535; ch++) {
int glyphId = font->MapUnicodeChar(ch);
@@ -401,6 +405,9 @@ void GlyphsPanel::rebuild()
(*row)[columns->code] = *it;
(*row)[columns->name] = tmp;
}
+
+ // Reconnect the model once it has been updated:
+ iconView->set_model(store);
}
}