Commit 321e7faf authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[FIX] - initially hidden props now get unhidden and hidden correctly.

parent 19e52561
......@@ -65,6 +65,10 @@ WPropertyWidget::WPropertyWidget( boost::shared_ptr< WPropertyBase > property,
setCurrentIndex( 1 );
}
// if the property is hidden initially, hide widget too
setHidden( m_property->isHidden() );
m_label.setHidden( m_property->isHidden() );
// setup the update callback
m_connection = m_property->getUpdateCondition()->subscribeSignal( boost::bind( &WPropertyWidget::propertyChangeNotifier, this ) );
}
......
......@@ -816,47 +816,44 @@ WQtPropertyGroupWidget* WQtControlPanel::buildPropWidget( boost::shared_ptr< WP
// iterate all properties.
for ( WProperties::PropertyConstIterator iter = propAccess->get().begin(); iter != propAccess->get().end(); ++iter )
{
if ( !( *iter )->isHidden() )
switch ( ( *iter )->getType() )
{
switch ( ( *iter )->getType() )
{
case PV_BOOL:
tab->addProp( ( *iter )->toPropBool() );
break;
case PV_INT:
tab->addProp( ( *iter )->toPropInt() );
break;
case PV_DOUBLE:
tab->addProp( ( *iter )->toPropDouble() );
break;
case PV_STRING:
tab->addProp( ( *iter )->toPropString() );
break;
case PV_PATH:
tab->addProp( ( *iter )->toPropFilename() );
break;
case PV_SELECTION:
tab->addProp( ( *iter )->toPropSelection() );
break;
case PV_COLOR:
tab->addProp( ( *iter )->toPropColor() );
break;
case PV_POSITION:
tab->addProp( ( *iter )->toPropPosition() );
break;
case PV_TRIGGER:
tab->addProp( ( *iter )->toPropTrigger() );
break;
case PV_GROUP:
tab->addGroup( buildPropWidget( ( *iter )->toPropGroup() ) );
break;
case PV_MATRIX4X4:
tab->addProp( ( *iter )->toPropMatrix4X4() );
break;
default:
WLogger::getLogger()->addLogMessage( "This property type is not yet supported.", "ControlPanel", LL_WARNING );
break;
}
case PV_BOOL:
tab->addProp( ( *iter )->toPropBool() );
break;
case PV_INT:
tab->addProp( ( *iter )->toPropInt() );
break;
case PV_DOUBLE:
tab->addProp( ( *iter )->toPropDouble() );
break;
case PV_STRING:
tab->addProp( ( *iter )->toPropString() );
break;
case PV_PATH:
tab->addProp( ( *iter )->toPropFilename() );
break;
case PV_SELECTION:
tab->addProp( ( *iter )->toPropSelection() );
break;
case PV_COLOR:
tab->addProp( ( *iter )->toPropColor() );
break;
case PV_POSITION:
tab->addProp( ( *iter )->toPropPosition() );
break;
case PV_TRIGGER:
tab->addProp( ( *iter )->toPropTrigger() );
break;
case PV_GROUP:
tab->addGroup( buildPropWidget( ( *iter )->toPropGroup() ) );
break;
case PV_MATRIX4X4:
tab->addProp( ( *iter )->toPropMatrix4X4() );
break;
default:
WLogger::getLogger()->addLogMessage( "This property type is not yet supported.", "ControlPanel", LL_WARNING );
break;
}
}
}
......
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