// VTK Includes
#include <vtkActorCollection.h>
-GEOMGUI_Selection::GEOMGUI_Selection( const QString& client, LightApp_SelectionMgr* mgr )
-: LightApp_Selection( client, mgr )
+GEOMGUI_Selection::GEOMGUI_Selection()
+: LightApp_Selection()
{
}
return QVariant( typeName( ind ) );
else if ( p == "displaymode" )
return QVariant( displayMode( ind ) );
+ else if ( p == "isAutoColor" )
+ return QVariant( isAutoColor( ind ) );
else
return LightApp_Selection::parameter( ind, p );
}
return false;
}
+bool GEOMGUI_Selection::isAutoColor( const int index ) const
+{
+ GEOM::GEOM_Object_var obj = getObject( index );
+ if ( !CORBA::is_nil( obj ) )
+ return obj->GetAutoColor();
+ return false;
+}
+
QString GEOMGUI_Selection::displayMode( const int index ) const
{
SALOME_View* view = GEOM_Displayer::GetActiveView();
return GEOM::GEOM_Object::_nil();
}
-QString GEOMGUI_Selection:: selectionMode() const
-{
+QString GEOMGUI_Selection::selectionMode() const
+{
SalomeApp_Application* app = (SalomeApp_Application*)(SUIT_Session::session()->activeApplication());
if (app) {
GeometryGUI* aGeomGUI = dynamic_cast<GeometryGUI*>( app->module( "Geometry" ) );
- if(aGeomGUI)
- switch(aGeomGUI->getLocalSelectionMode())
- {
+ if (aGeomGUI) {
+ switch (aGeomGUI->getLocalSelectionMode())
+ {
case GEOM_POINT : return "VERTEX";
case GEOM_EDGE : return "EDGE";
case GEOM_WIRE : return "WIRE";
case GEOM_COMPOUND : return "COMPOUND";
case GEOM_ALLOBJECTS : return "ALL";
default: return "";
- }
+ }
+ }
}
return "";
}