Remember Retinex Settings expanded state, wip

This commit is contained in:
Morgan Hardwood
2015-09-16 03:12:44 +02:00
parent d6c4035a73
commit 7d78c05603
2 changed files with 6 additions and 4 deletions

View File

@@ -47,11 +47,10 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
retinexcolorspace->set_active(0); retinexcolorspace->set_active(0);
retinexColorSpaceConn = retinexcolorspace->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::retinexColorSpaceChanged) ); retinexColorSpaceConn = retinexcolorspace->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::retinexColorSpaceChanged) );
dhbox->pack_start(*retinexMethod); dhbox->pack_start(*retinexMethod);
dhbox->pack_start(*retinexcolorspace); dhbox->pack_start(*retinexcolorspace);
retinexVBox->pack_start(*dhbox); retinexVBox->pack_start(*dhbox);
std::vector<double> defaultCurve;
// Histogram equalizer Lab curve // Histogram equalizer Lab curve
curveEditorGD = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_LAB")); 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(); curveEditorGD->curveListComplete();
// Histogram equalizer HSL curve // Histogram equalizer HSL curve
curveEditorGDH = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_HSL")); curveEditorGDH = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_HSL"));
curveEditorGDH->setCurveListener (this); 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 = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_TRANSMISSION"));
transmissionCurveEditorG->setCurveListener (this); transmissionCurveEditorG->setCurveListener (this);
std::vector<double> defaultCurve;
rtengine::RetinexParams::getDefaulttransmissionCurve(defaultCurve); rtengine::RetinexParams::getDefaulttransmissionCurve(defaultCurve);
transmissionShape = static_cast<FlatCurveEditor*>(transmissionCurveEditorG->addCurve(CT_Flat, "", NULL, false)); transmissionShape = static_cast<FlatCurveEditor*>(transmissionCurveEditorG->addCurve(CT_Flat, "", NULL, false));
transmissionShape->setIdentityValue(0.); transmissionShape->setIdentityValue(0.);
@@ -238,8 +239,8 @@ void Retinex::writeOptions(std::vector<int> &tpOpen)
void Retinex::updateToolState(std::vector<int> &tpOpen) void Retinex::updateToolState(std::vector<int> &tpOpen)
{ {
if(tpOpen.size() == 9) { if(tpOpen.size() == 10) {
expsettings->set_expanded(tpOpen.at(0)); expsettings->set_expanded(tpOpen.at(9));
} }
} }

View File

@@ -559,6 +559,7 @@ void ToolPanelCoordinator::writeOptions ()
} }
wavelet->writeOptions(options.tpOpen); wavelet->writeOptions(options.tpOpen);
retinex->writeOptions(options.tpOpen);
} }