Gui: fixes DlgSettingsColorGradientImp:

* handle exception in lambda function if max <= min
* fix regression of 10768fb32: a validator can be set to only one widget at a time
This commit is contained in:
wmayer
2022-04-03 10:51:10 +02:00
parent 39f4d20ead
commit 078ce76b88
3 changed files with 17 additions and 6 deletions

View File

@@ -315,7 +315,12 @@ void SoFCColorGradient::customize(SoFCColorBarBase* parentNode)
};
QObject::connect(&dlg, &Gui::Dialog::DlgSettingsColorGradientImp::colorModelChanged,
[&] {
applyProfile(dlg.getProfile());
try {
applyProfile(dlg.getProfile());
}
catch (const Base::Exception& e) {
e.ReportException();
}
});
if (dlg.exec() != QDialog::Accepted) {