GUI code cleanup
- Remove usage of std::numeric_limits<int>::max() in GUI which bring unwanted behavior. - Put the PixelShift options in a Gtk::Frame (requested on IRC) - Add the fast_export raw options to the GUI (was created but not added to the container). Incidentally, fix a memory leak. - Add a missing History message
This commit is contained in:
@@ -136,7 +136,7 @@ void FlatField::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi
|
||||
flatFieldClipControl->setAutoInconsistent(multiImage && !pedited->raw.ff_AutoClipControl);
|
||||
|
||||
if( !pedited->raw.ff_BlurType ) {
|
||||
flatFieldBlurType->set_active(std::numeric_limits<int>::max()); // No name
|
||||
flatFieldBlurType->set_active_text(M("GENERAL_UNCHANGED"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ void FlatField::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedit
|
||||
|
||||
int currentRow = flatFieldBlurType->get_active_row_number();
|
||||
|
||||
if( currentRow >= 0 && currentRow < std::numeric_limits<int>::max()) {
|
||||
if( currentRow >= 0 && flatFieldBlurType->get_active_text() != M("GENERAL_UNCHANGED")) {
|
||||
pp->raw.ff_BlurType = procparams::RAWParams::getFlatFieldBlurTypeStrings()[currentRow];
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ void FlatField::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedit
|
||||
pedited->raw.ff_BlurRadius = flatFieldBlurRadius->getEditedState ();
|
||||
pedited->raw.ff_clipControl = flatFieldClipControl->getEditedState ();
|
||||
pedited->raw.ff_AutoClipControl = !flatFieldClipControl->getAutoInconsistent();
|
||||
pedited->raw.ff_BlurType = flatFieldBlurType->get_active_row_number() != std::numeric_limits<int>::max();
|
||||
pedited->raw.ff_BlurType = flatFieldBlurType->get_active_text() != M("GENERAL_UNCHANGED");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -340,20 +340,14 @@ void FlatField::flatFieldBlurTypeChanged ()
|
||||
const int curSelection = flatFieldBlurType->get_active_row_number();
|
||||
const RAWParams::FlatFieldBlurType blur_type = RAWParams::FlatFieldBlurType(curSelection);
|
||||
|
||||
Glib::ustring s;
|
||||
|
||||
if (curSelection >= 0 && curSelection < std::numeric_limits<int>::max()) {
|
||||
s = flatFieldBlurType->get_active_text();
|
||||
}
|
||||
|
||||
if (multiImage || blur_type == procparams::RAWParams::FlatFieldBlurType::AREA) {
|
||||
flatFieldClipControl->show();
|
||||
} else {
|
||||
flatFieldClipControl->hide();
|
||||
}
|
||||
|
||||
if (listener) {
|
||||
listener->panelChanged (EvFlatFieldBlurType, s);
|
||||
if (listener && curSelection >= 0) {
|
||||
listener->panelChanged (EvFlatFieldBlurType, flatFieldBlurType->get_active_text());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user