summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTomasz Boczkowski <penginsbacon@gmail.com>2015-05-11 22:28:20 +0000
committerTomasz Boczkowski <penginsbacon@gmail.com>2015-05-11 22:28:20 +0000
commitfbff05fb816454688444dd23169a70092f1252bc (patch)
tree0886b4b46246788173629077a8ba82a1962872f5 /src
parentmerged trunk (diff)
downloadinkscape-fbff05fb816454688444dd23169a70092f1252bc.tar.gz
inkscape-fbff05fb816454688444dd23169a70092f1252bc.zip
fixed color selector not remembering it's last open tab
(bzr r14059.1.25)
Diffstat (limited to 'src')
-rw-r--r--src/ui/widget/color-notebook.cpp2
-rw-r--r--src/widgets/paint-selector.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/widget/color-notebook.cpp b/src/ui/widget/color-notebook.cpp
index 0150f2ca2..60abf43bf 100644
--- a/src/ui/widget/color-notebook.cpp
+++ b/src/ui/widget/color-notebook.cpp
@@ -275,7 +275,7 @@ void ColorNotebook::_onSelectedColorChanged() { _updateICCButtons(); }
void ColorNotebook::_onPageSwitched(GtkNotebook *notebook, GtkWidget *page, guint page_num, ColorNotebook *colorbook)
{
- if (colorbook) {
+ if (colorbook->get_visible()) {
// remember the page we switched to
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
prefs->setInt("/colorselector/page", page_num);
diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp
index f9a537f41..846ded511 100644
--- a/src/widgets/paint-selector.cpp
+++ b/src/widgets/paint-selector.cpp
@@ -586,6 +586,9 @@ sp_paint_selector_clear_frame(SPPaintSelector *psel)
if (psel->selector) {
+ //This is a hack to work around GtkNotebook bug in ColorSelector. Is sends signal switch-page on destroy
+ //The widget is hidden firts so it can recognize that it should not process signals from notebook child
+ gtk_widget_set_visible(psel->selector, false);
gtk_widget_destroy(psel->selector);
psel->selector = NULL;
}