summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorGeoff Lankow <geoff@darktrojan.net>2018-05-31 00:42:20 +0000
committerGeoff Lankow <geoff@darktrojan.net>2018-05-31 09:07:38 +0000
commitbf5e21b8fd1165ad0969897d49ee6b8dd6fbd30f (patch)
tree71356b72a90fdca519c315f630eb3838bd287d3b /src/ui
parentAdd center mirror symmetry butons for perfect symmetry and rotate copyes cleanup (diff)
downloadinkscape-bf5e21b8fd1165ad0969897d49ee6b8dd6fbd30f.tar.gz
inkscape-bf5e21b8fd1165ad0969897d49ee6b8dd6fbd30f.zip
In font list, don't change selection if current font is already selected; other minor fixes
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/text-edit.cpp6
-rw-r--r--src/ui/widget/font-selector.cpp11
2 files changed, 12 insertions, 5 deletions
diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp
index ff97bb68c..bc437fac2 100644
--- a/src/ui/dialog/text-edit.cpp
+++ b/src/ui/dialog/text-edit.cpp
@@ -74,12 +74,12 @@ TextEdit::TextEdit()
selectChangedConn(),
subselChangedConn(),
selectModifiedConn(),
+ blocked(false),
/*
TRANSLATORS: Test string used in text and font dialog (when no
* text has been entered) to get a preview of the font. Choose
* some representative characters that users of your locale will be
* interested in.*/
- blocked(false),
samplephrase(_("AaBbCcIiPpQq12369$\342\202\254\302\242?.;/()"))
{
@@ -441,6 +441,10 @@ void TextEdit::onApply()
apply_button.set_sensitive ( false );
sp_repr_css_attr_unref (css);
+
+ Inkscape::FontLister* font_lister = Inkscape::FontLister::get_instance();
+ font_lister->update_font_list(SP_ACTIVE_DESKTOP->getDocument());
+
blocked = false;
}
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));