Solving issue #4014 : Batch Edit "Transform-Resize" randomly changes

default values in USM

Reidentation in batchtoolpanelcoord.cc for a more compact code
This commit is contained in:
Hombre57
2017-08-29 02:07:58 +02:00
parent f3b4722e4f
commit 8df659d2fd
9 changed files with 226 additions and 465 deletions

View File

@@ -423,13 +423,15 @@ void Sharpening::halocontrol_toggled ()
void Sharpening::method_changed ()
{
removeIfThere (this, usm, false);
removeIfThere (this, rld, false);
if (!batchMode) {
removeIfThere (this, usm, false);
removeIfThere (this, rld, false);
if (method->get_active_row_number() == 0) {
pack_start (*usm);
} else if (method->get_active_row_number() == 1) {
pack_start (*rld);
if (method->get_active_row_number() == 0) {
pack_start (*usm);
} else if (method->get_active_row_number() == 1) {
pack_start (*rld);
}
}
if (listener && (multiImage || getEnabled()) ) {
@@ -461,16 +463,30 @@ void Sharpening::setBatchMode (bool batchMode)
method->append (M("GENERAL_UNCHANGED"));
}
void Sharpening::setAdjusterBehavior (bool amountadd)
void Sharpening::setAdjusterBehavior (bool radiusadd, bool amountadd, bool dampingadd, bool iteradd, bool edgetoladd, bool haloctrladd)
{
radius->setAddMode(radiusadd);
dradius->setAddMode(radiusadd);
amount->setAddMode(amountadd);
damount->setAddMode(amountadd);
ddamping->setAddMode(dampingadd);
diter->setAddMode(iteradd);
eradius->setAddMode(radiusadd);
etolerance->setAddMode(edgetoladd);
hcamount->setAddMode(haloctrladd);
}
void Sharpening::trimValues (rtengine::procparams::ProcParams* pp)
{
radius->trimValue(pp->sharpening.radius);
dradius->trimValue(pp->sharpening.deconvradius);
amount->trimValue(pp->sharpening.amount);
damount->trimValue(pp->sharpening.deconvamount);
ddamping->trimValue(pp->sharpening.deconvdamping);
diter->trimValue(pp->sharpening.deconviter);
eradius->trimValue(pp->sharpening.edges_radius);
etolerance->trimValue(pp->sharpening.edges_tolerance);
hcamount->trimValue(pp->sharpening.halocontrol_amount);
}