summaryrefslogtreecommitdiffstats
path: root/src/widgets/gradient-selector.cpp
diff options
context:
space:
mode:
authorJohn Smith <john.smith7545@yahoo.com>2012-10-22 12:47:12 +0000
committerJohn Smith <john.smith7545@yahoo.com>2012-10-22 12:47:12 +0000
commited87de315e80b0066e2dd74d07ff2ec688592072 (patch)
treeb343e484aa1c3da5dffe828c64c41232c60344f9 /src/widgets/gradient-selector.cpp
parentbecause we are in frost: disable experimental LPEs (diff)
downloadinkscape-ed87de315e80b0066e2dd74d07ff2ec688592072.tar.gz
inkscape-ed87de315e80b0066e2dd74d07ff2ec688592072.zip
Fix for 1067808 : Focus issues with new gradient (and swatch) manager in Fill&Stroke (trunk)
(bzr r11819)
Diffstat (limited to 'src/widgets/gradient-selector.cpp')
-rw-r--r--src/widgets/gradient-selector.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/widgets/gradient-selector.cpp b/src/widgets/gradient-selector.cpp
index dffda69e3..65608585b 100644
--- a/src/widgets/gradient-selector.cpp
+++ b/src/widgets/gradient-selector.cpp
@@ -336,6 +336,14 @@ void SPGradientSelector::onTreeSelection()
return;
}
+ if (!treeview->has_focus()) {
+ /* Workaround for GTK bug on Windows/OS X
+ * When the treeview initially doesn't have focus and is clicked
+ * sometimes get_selection()->signal_changed() has the wrong selection
+ */
+ treeview->grab_focus();
+ }
+
const Glib::RefPtr<Gtk::TreeSelection> sel = treeview->get_selection();
if (!sel) {
return;