mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-10 16:53:06 +05:00
[bos #32736][CEA] Threshold of criteria. Fixed checking of Logarithmic checkbox on min-max changing.
This commit is contained in:
parent
19b74c9f65
commit
fbabf737e2
@ -745,11 +745,19 @@ void SMESHGUI_Preferences_ScalarBarDlg::onSelectionChanged()
|
|||||||
//=================================================================================================
|
//=================================================================================================
|
||||||
void SMESHGUI_Preferences_ScalarBarDlg::onMinMaxChanged()
|
void SMESHGUI_Preferences_ScalarBarDlg::onMinMaxChanged()
|
||||||
{
|
{
|
||||||
double aMin = myMinEdit->text().toDouble();
|
// Check if the min-max range is valid.
|
||||||
double aMax = myMaxEdit->text().toDouble();
|
const double aMin = myMinEdit->text().toDouble();
|
||||||
bool isLogarithmicEnabled = (aMin > 1e-07 && aMax > 1e-07);
|
const double aMax = myMaxEdit->text().toDouble();
|
||||||
myLogarithmicCheck->setChecked(isLogarithmicEnabled);
|
const bool isLogarithmicEnabled = aMin > 1e-07 && aMax > 1e-07; // TODO: is it right validation?
|
||||||
|
|
||||||
|
// The checkbox should be enabled only when the range is valid for it
|
||||||
myLogarithmicCheck->setEnabled(isLogarithmicEnabled);
|
myLogarithmicCheck->setEnabled(isLogarithmicEnabled);
|
||||||
|
|
||||||
|
// Change checkbox only if the range is not valid. Otherwise it's on the user decision.
|
||||||
|
if (!isLogarithmicEnabled)
|
||||||
|
{
|
||||||
|
myLogarithmicCheck->setChecked(isLogarithmicEnabled);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================================
|
//=================================================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user