Improve and clean code

This commit is contained in:
Desmis 2020-06-09 11:00:48 +02:00
parent d3538fb230
commit ad48610dfb
3 changed files with 46 additions and 12 deletions

View File

@ -2194,6 +2194,42 @@ WaveletParams::WaveletParams() :
0.35, 0.35,
0.35 0.35
}, },
opacityCurveSH{
static_cast<double>(FCT_MinMaxCPoints),
0.,
1.,
0.35,
0.35,
0.15,
0.9,
0.35,
0.35,
0.4,
0.8,
0.35,
0.35,
0.4,
0.5,
0.35,
0.35,
0.5,
0.5,
0.35,
0.35,
0.5,
0.2,
0.35,
0.35,
0.8,
0.1,
0.35,
0.35,
1.0,
0.,
0.35,
0.35
},
/*
opacityCurveSH{ opacityCurveSH{
static_cast<double>(FCT_MinMaxCPoints), static_cast<double>(FCT_MinMaxCPoints),
0.0, 0.0,
@ -2213,6 +2249,7 @@ WaveletParams::WaveletParams() :
0.35, 0.35,
0.35 0.35
}, },
*/
opacityCurveBY{ opacityCurveBY{
static_cast<double>(FCT_MinMaxCPoints), static_cast<double>(FCT_MinMaxCPoints),
0.0, 0.0,
@ -2343,7 +2380,7 @@ WaveletParams::WaveletParams() :
thres(7), thres(7),
chroma(5), chroma(5),
chro(0), chro(0),
threshold(5), threshold(4),
threshold2(5), threshold2(5),
edgedetect(90), edgedetect(90),
edgedetectthr(20), edgedetectthr(20),

View File

@ -1165,11 +1165,8 @@ void Wavelet::updateGUI()
{ {
const int temp2 = threshold2->getValue(); const int temp2 = threshold2->getValue();
const int temp = threshold->getValue(); const int temp = threshold->getValue();
int tempmax = temp + 1; const int tempmax = (temp + 1) > 9 ? 9 : temp + 1;
if(tempmax > 9) { threshold2->setLimits(temp, 9, 1, tempmax);
tempmax = 9;
}
threshold2->setLimits(temp, 9, 1, temp + 1);
threshold2 ->setValue(temp2); threshold2 ->setValue(temp2);
} }