From 7394aa3806a9503ddaae0018d417b01448e4e4b0 Mon Sep 17 00:00:00 2001 From: Hombre57 Date: Sat, 19 Aug 2017 15:12:24 +0200 Subject: [PATCH] Fix issue #4019 --- rtdata/themes/RawTherapee-GTK3-20_.css | 2 +- rtgui/curveeditor.cc | 2 +- rtgui/curveeditorgroup.cc | 2 +- rtgui/popupcommon.cc | 7 +++++-- rtgui/popupcommon.h | 12 ++++++++++-- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/rtdata/themes/RawTherapee-GTK3-20_.css b/rtdata/themes/RawTherapee-GTK3-20_.css index f661198af..ff780a4e3 100644 --- a/rtdata/themes/RawTherapee-GTK3-20_.css +++ b/rtdata/themes/RawTherapee-GTK3-20_.css @@ -189,7 +189,7 @@ button { } /* Curve mode buttons and drop-downs */ -button:checked.Left, button:checked.Left + button { +button:checked.Left { background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3)); background-color: #585858; } diff --git a/rtgui/curveeditor.cc b/rtgui/curveeditor.cc index f8beff547..9f2dbffab 100644 --- a/rtgui/curveeditor.cc +++ b/rtgui/curveeditor.cc @@ -217,7 +217,7 @@ CurveEditor::CurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup, CurveEd curveType->set_tooltip_text(M("CURVEEDITOR_TYPE")); // TODO: Does this signal have to be blocked when on curve type change ? curveType->signal_toggled().connect ( sigc::mem_fun(*this, &CurveEditor::curveTypeToggled) ); - typeconn = curveType->signal_changed().connect (sigc::mem_fun(*this, &CurveEditor::typeSelectionChanged) ); + typeconn = curveType->signal_item_selected().connect (sigc::mem_fun(*this, &CurveEditor::typeSelectionChanged) ); } void CurveEditor::setCurve (const std::vector& p) diff --git a/rtgui/curveeditorgroup.cc b/rtgui/curveeditorgroup.cc index 29c8f5f84..e8f636f8b 100644 --- a/rtgui/curveeditorgroup.cc +++ b/rtgui/curveeditorgroup.cc @@ -194,7 +194,7 @@ void CurveEditorGroup::curveListComplete() */ void CurveEditorGroup::typeSelectionChanged (CurveEditor* ce, int n) { - // Same type : do nothing + // Same curve and same type : do nothing if (ce == displayedCurve && n == (int)ce->selected) { return; } diff --git a/rtgui/popupcommon.cc b/rtgui/popupcommon.cc index 47d9efe66..c79c69011 100644 --- a/rtgui/popupcommon.cc +++ b/rtgui/popupcommon.cc @@ -100,9 +100,12 @@ bool PopUpCommon::addEntry (const Glib::ustring& fileName, const Glib::ustring& void PopUpCommon::entrySelected (int i) { - // Emit a a signal if the selected item has changed + // Emit a signal if the selected item has changed if (setSelected (i)) - message (selected); + messageChanged (selected); + + // Emit a signal in all case (i.e. propagate the signal_activate event) + messageItemSelected (selected); } void PopUpCommon::setItemSensitivity (int index, bool isSensitive) { diff --git a/rtgui/popupcommon.h b/rtgui/popupcommon.h index 8875f402e..f4bdb581f 100644 --- a/rtgui/popupcommon.h +++ b/rtgui/popupcommon.h @@ -42,7 +42,9 @@ class PopUpCommon public: typedef sigc::signal type_signal_changed; + typedef sigc::signal type_signal_item_selected; type_signal_changed signal_changed(); + type_signal_item_selected signal_item_selected(); Gtk::Grid* buttonGroup; // this is the widget to be packed PopUpCommon (Gtk::Button* button, const Glib::ustring& label = ""); @@ -57,7 +59,8 @@ public: void setItemSensitivity (int i, bool isSensitive); private: - type_signal_changed message; + type_signal_changed messageChanged; + type_signal_item_selected messageItemSelected; std::vector imageFilenames; std::vector images; @@ -78,7 +81,12 @@ protected: inline PopUpCommon::type_signal_changed PopUpCommon::signal_changed () { - return message; + return messageChanged; +} + +inline PopUpCommon::type_signal_item_selected PopUpCommon::signal_item_selected () +{ + return messageItemSelected; } inline int PopUpCommon::getEntryCount () const