From 7d78c056033109b58d62ea0a4b84dee9c03c7a2a Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Wed, 16 Sep 2015 03:12:44 +0200 Subject: [PATCH] Remember Retinex Settings expanded state, wip --- rtgui/retinex.cc | 9 +++++---- rtgui/toolpanelcoord.cc | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc index 76cb24675..9d0f8b9df 100644 --- a/rtgui/retinex.cc +++ b/rtgui/retinex.cc @@ -47,11 +47,10 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), retinexcolorspace->set_active(0); retinexColorSpaceConn = retinexcolorspace->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::retinexColorSpaceChanged) ); - dhbox->pack_start(*retinexMethod); dhbox->pack_start(*retinexcolorspace); retinexVBox->pack_start(*dhbox); - std::vector defaultCurve; + // Histogram equalizer Lab curve curveEditorGD = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_LAB")); @@ -67,6 +66,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), curveEditorGD->curveListComplete(); + // Histogram equalizer HSL curve curveEditorGDH = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_HSL")); curveEditorGDH->setCurveListener (this); @@ -86,6 +86,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), transmissionCurveEditorG = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_TRANSMISSION")); transmissionCurveEditorG->setCurveListener (this); + std::vector defaultCurve; rtengine::RetinexParams::getDefaulttransmissionCurve(defaultCurve); transmissionShape = static_cast(transmissionCurveEditorG->addCurve(CT_Flat, "", NULL, false)); transmissionShape->setIdentityValue(0.); @@ -238,8 +239,8 @@ void Retinex::writeOptions(std::vector &tpOpen) void Retinex::updateToolState(std::vector &tpOpen) { - if(tpOpen.size() == 9) { - expsettings->set_expanded(tpOpen.at(0)); + if(tpOpen.size() == 10) { + expsettings->set_expanded(tpOpen.at(9)); } } diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index ad13459f0..3c82cd0a8 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -559,6 +559,7 @@ void ToolPanelCoordinator::writeOptions () } wavelet->writeOptions(options.tpOpen); + retinex->writeOptions(options.tpOpen); }