Commit d8287c1c authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE #172] interval widget now invalidates the property when providing a max<min value.

parent 9597844a
...@@ -117,7 +117,8 @@ void WPropertyIntervalWidget::minMaxUpdated() ...@@ -117,7 +117,8 @@ void WPropertyIntervalWidget::minMaxUpdated()
bool validMax; bool validMax;
double maxValue = m_maxEdit.text().toDouble( &validMax ); double maxValue = m_maxEdit.text().toDouble( &validMax );
if( !( validMin && validMax ) ) // mark the prop invalid if the user specifies some strange values
if( !( validMin && validMax ) || ( minValue > maxValue ) )
{ {
invalidate(); invalidate();
return; return;
...@@ -129,6 +130,6 @@ void WPropertyIntervalWidget::minMaxUpdated() ...@@ -129,6 +130,6 @@ void WPropertyIntervalWidget::minMaxUpdated()
void WPropertyIntervalWidget::reset() void WPropertyIntervalWidget::reset()
{ {
// WProperties does not really provide a default value mechanism. // WProperties does not really provide a default value mechanism yet.
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment