QString orCurveInvisible = "or (type='VISU::TCURVE'" + andInvisible + ")";
QString aPrsVisible = "(($type in {'VISU::TMESH' " + aPrsAll + "}) and isVisible)";
QString aPrsInvisible = "(($type in {'VISU::TMESH' " + aPrsAll + "})" + andInvisible + ")";
- QString aComponent = "( selcount=1 and canBeDisplayed and isComponent )";
+ QString aComponent = "( selcount=1 and canBeDisplayed and isVisuComponent )";
QString anEraseRule = "( selcount>0 and ({true} in $canBeDisplayed) and (" + aPrsVisible +
" or (client='ObjectBrowser' and (" + aTableOrCont + orCurveVisible + "))) ) or " + aComponent;
#include "VisuGUI_Tools.h"
#include "VISU_Result_i.hh"
+#include "VISU_Gen_i.hh"
#include "VISU_Actor.h"
#include "VISU_ScalarMapAct.h"
else if ( p == "hasActor" ) val = QtxValue( hasActor( ind ) );
else if ( p == "isShading" ) val = QtxValue( isShading( ind ) );
else if ( p == "isScalarMapAct" ) val = QtxValue( isScalarMapAct( ind ) );
+ else if ( p == "isVisuComponent") val = QtxValue( isVisuComponent( ind ) );
}
return val;
return aResStr;
}
+
+bool VisuGUI_Selection::isVisuComponent( const int ind ) const
+{
+ SalomeApp_Study* study = GetStudy();
+ if ( !study )
+ return false;
+
+ _PTR(SObject) obj = study->studyDS()->FindObjectID( entry( ind ).latin1() );
+ CORBA::Object_var anObj = VISU::ClientSObjectToObject( obj );
+ if( CORBA::is_nil( anObj ) )
+ return false;
+
+ return dynamic_cast<VISU::VISU_Gen_i*>( VISU::GetServant( anObj ).in() );
+}
QString hasActor( const int ) const;
QString isShading( const int ) const;
QString isScalarMapAct( const int ) const;
+ bool isVisuComponent( const int ) const;
private:
int nbChild( const int, const bool ) const;