Commit 9d2d98a9 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[CHANGE] - int and double widget now hide their shader if no min/max constraints where set.

parent dd141523
......@@ -71,11 +71,12 @@ void WPropertyDoubleWidget::update()
m_min = 0;
if ( minC.get() )
{
m_slider.setHidden( false );
m_min = minC->getMin();
}
else
{
m_slider.hide();
m_slider.setHidden( true );
}
// get the max constraint
......@@ -83,11 +84,12 @@ void WPropertyDoubleWidget::update()
m_max = 100;
if ( maxC.get() )
{
m_slider.setHidden( false );
m_max = maxC->getMax();
}
else
{
m_slider.hide();
m_slider.setHidden( true );
}
// setup the slider
......
......@@ -72,12 +72,12 @@ void WPropertyIntWidget::update()
int min = 0;
if ( minC.get() )
{
m_slider.setHidden( false );
min = minC->getMin();
}
else
{
wlog::warn( "PropertyWidget( " + m_intProperty->getName() + " )" ) << "The property has no minimum constraint. " <<
"You should define it to avoid unexpected behaviour. Using default (" << min << ").";
m_slider.setHidden( true );
}
// get the max constraint
......@@ -85,12 +85,12 @@ void WPropertyIntWidget::update()
int max = 100;
if ( maxC.get() )
{
m_slider.setHidden( false );
max = maxC->getMax();
}
else
{
wlog::warn( "PropertyWidget( " + m_intProperty->getName() + " )" ) << "The property has no maximum constraint. " <<
"You should define it to avoid unexpected behaviour. Using default (" << max << ").";
m_slider.setHidden( true );
}
// setup the slider
......
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