diff options
Diffstat (limited to 'src/ui/widget/font-selector.cpp')
| -rw-r--r-- | src/ui/widget/font-selector.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ui/widget/font-selector.cpp b/src/ui/widget/font-selector.cpp index 70f7d55db..0205080d3 100644 --- a/src/ui/widget/font-selector.cpp +++ b/src/ui/widget/font-selector.cpp @@ -105,8 +105,6 @@ FontSelector::FontSelector (bool with_size, bool with_variations) // Initialize font family lists. (May already be done.) Should be done on document change. font_lister->update_font_list(SP_ACTIVE_DESKTOP->getDocument()); - - font_lister->connectUpdate(sigc::mem_fun(*this, &FontSelector::update_font)); } void @@ -166,8 +164,13 @@ FontSelector::update_font () path.push_back(0); } - family_treeview.set_cursor (path); - family_treeview.scroll_to_row (path); + Gtk::TreePath currentPath; + Gtk::TreeViewColumn *currentColumn; + family_treeview.get_cursor(currentPath, currentColumn); + if (currentPath.empty() || !font_lister->is_path_for_font(currentPath, family)) { + family_treeview.set_cursor (path); + family_treeview.scroll_to_row (path); + } // Get font-lister style list for selected family Gtk::TreeModel::Row row = *(family_treeview.get_model()->get_iter (path)); |
