Merge pull request #6093 from Pandagrapher/origin_dev

Local Adjustments - Fix for GUI issue #6082
This commit is contained in:
Pandagrapher 2021-02-04 17:00:36 +01:00 committed by GitHub
commit b798f4812d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -954,6 +954,7 @@ void ControlSpotPanel::spotMethodChanged()
const auto iter = s->get_selected(); const auto iter = s->get_selected();
Gtk::TreeModel::Row row = *iter; Gtk::TreeModel::Row row = *iter;
const int oldSpotMethod = row[spots_.spotMethod];
row[spots_.spotMethod] = spotMethod_->get_active_row_number(); row[spots_.spotMethod] = spotMethod_->get_active_row_number();
// Update Control Spot GUI according to spotMethod_ combobox state (to be compliant with updateParamVisibility function) // Update Control Spot GUI according to spotMethod_ combobox state (to be compliant with updateParamVisibility function)
@ -961,47 +962,61 @@ void ControlSpotPanel::spotMethodChanged()
excluFrame->show(); excluFrame->show();
} else if (spotMethod_->get_active_row_number() == 0) { // Normal case } else if (spotMethod_->get_active_row_number() == 0) { // Normal case
excluFrame->hide(); excluFrame->hide();
locX_->setValue(150.);
adjusterChanged(locX_, 1.); // Reset spot shape only if previous spotMethod is Full image
locXL_->setValue(150.); if (oldSpotMethod == 2) {
adjusterChanged(locXL_, 1.); disableParamlistener(true);
locY_->setValue(150.); locX_->setValue(150.);
adjusterChanged(locY_, 1.); row[spots_.locX] = locX_->getIntValue();
locYT_->setValue(150.); locXL_->setValue(150.);
adjusterChanged(locYT_, 1.); row[spots_.locXL] = locXL_->getIntValue();
shape_->set_active(0); locY_->setValue(150.);
shapeChanged(); row[spots_.locY] = locY_->getIntValue();
transit_->setValue(60.); locYT_->setValue(150.);
adjusterChanged(transit_, 1.); row[spots_.locYT] = locYT_->getIntValue();
shape_->set_active(0);
row[spots_.shape] = shape_->get_active_row_number();
transit_->setValue(60.);
row[spots_.transit] = transit_->getValue();
disableParamlistener(false);
updateControlSpotCurve(row);
}
} else if (spotMethod_->get_active_row_number() == 1) { // Excluding case } else if (spotMethod_->get_active_row_number() == 1) { // Excluding case
excluFrame->show(); excluFrame->show();
locX_->setValue(150.);
adjusterChanged(locX_, 1.); // Reset spot shape only if previous spotMethod is Full image
locXL_->setValue(150.); if (oldSpotMethod == 2) {
adjusterChanged(locXL_, 1.); disableParamlistener(true);
locY_->setValue(150.); locX_->setValue(150.);
adjusterChanged(locY_, 1.); row[spots_.locX] = locX_->getIntValue();
locYT_->setValue(150.); locXL_->setValue(150.);
adjusterChanged(locYT_, 1.); row[spots_.locXL] = locXL_->getIntValue();
shape_->set_active(0); locY_->setValue(150.);
shapeChanged(); row[spots_.locY] = locY_->getIntValue();
transit_->setValue(60.); locYT_->setValue(150.);
adjusterChanged(transit_, 1.); row[spots_.locYT] = locYT_->getIntValue();
shape_->set_active(0);
row[spots_.shape] = shape_->get_active_row_number();
transit_->setValue(60.);
row[spots_.transit] = transit_->getValue();
disableParamlistener(false);
updateControlSpotCurve(row);
}
} else if (spotMethod_->get_active_row_number() == 2) { // Full image case } else if (spotMethod_->get_active_row_number() == 2) { // Full image case
excluFrame->hide(); excluFrame->hide();
locX_->setValue(3000.); locX_->setValue(3000.);
adjusterChanged(locX_, 1.); row[spots_.locX] = locX_->getIntValue();
locXL_->setValue(3000.); locXL_->setValue(3000.);
adjusterChanged(locXL_, 1.); row[spots_.locXL] = locXL_->getIntValue();
locY_->setValue(3000.); locY_->setValue(3000.);
adjusterChanged(locY_, 1.); row[spots_.locY] = locY_->getIntValue();
locYT_->setValue(3000.); locYT_->setValue(3000.);
adjusterChanged(locYT_, 1.); row[spots_.locYT] = locYT_->getIntValue();
shape_->set_active(1); shape_->set_active(1);
shapeChanged(); row[spots_.shape] = shape_->get_active_row_number();
transit_->setValue(100.); transit_->setValue(100.);
adjusterChanged(transit_, 1.); row[spots_.transit] = transit_->getValue();
} }
// Raise event // Raise event