{
}
-QtxValue GEOMGUI_Selection::param( const int ind, const QString& p ) const
+QtxValue GEOMGUI_Selection::globalParam( const QString& p ) const
{
- QtxValue val( SalomeApp_Selection::param( ind, p ) );
- if ( !val.isValid() ) {
- if ( p == "isVisible" ) val = QtxValue( isVisible( ind ) );
- else if ( p == "isOCC" ) val = QtxValue( isOCC() );
- else if ( p == "type" ) val = QtxValue( typeName( ind ) );
- else if ( p == "displaymode" ) val = QtxValue( displayMode( ind ) );
- else if ( p == "isActiveViewer" ) val = QtxValue( isActiveViewer() );
- }
+ if ( p == "isOCC" ) return QtxValue( isOCC() );
+ else if ( p == "isActiveViewer" ) return QtxValue( isActiveViewer() );
- //printf( "--> param() : [%s] = %s\n", p.latin1(), val.toString ().latin1() );
+ return SalomeApp_Selection::globalParam( p );
+}
- return val;
+QtxValue GEOMGUI_Selection::param( const int ind, const QString& p ) const
+{
+ if ( p == "isVisible" ) return QtxValue( isVisible( ind ) );
+ else if ( p == "type" ) return QtxValue( typeName( ind ) );
+ else if ( p == "displaymode" ) return QtxValue( displayMode( ind ) );
+
+ return SalomeApp_Selection::param( ind, p );
}
QString GEOMGUI_Selection::typeName( const int index ) const
{
return ( SUIT_Session::session()->activeApplication()->desktop()->activeWindow() != 0 );
}
+
mgr->setRule( action( 8034 ), "client='OCCViewer' and selcount>0", true );
mgr->insert( separator(), -1, -1 ); // -----------
mgr->insert( action( 216 ), -1, -1 ); // display
- mgr->setRule( action( 216 ), "$isActiveViewer in {true} and selcount>0 and (($type in {'Shape' 'Group'} and ($isVisible in {false})) or $type in {'Component'})", true );
+ mgr->setRule( action( 216 ), "isActiveViewer=true and selcount>0 and (($type in {'Shape' 'Group'} and ($isVisible in {false})) or $type in {'Component'})", true );
mgr->insert( action( 215 ), -1, -1 ); // erase
- mgr->setRule( action( 215 ), "$isActiveViewer in {true} and selcount>0 and (($type in {'Shape' 'Group'} and $isVisible in {true}) or ($type in {'Component'} and selcount=1))", true );
+ mgr->setRule( action( 215 ), "isActiveViewer=true and selcount>0 and (($type in {'Shape' 'Group'} and $isVisible in {true}) or ($type in {'Component'} and selcount=1))", true );
mgr->insert( action( 214 ), -1, -1 ); // erase All
- mgr->setRule( action( 214 ), "$isActiveViewer in {true} and $client in {'OCCViewer' 'VTKViewer'}", true );
+ mgr->setRule( action( 214 ), "isActiveViewer=true and $client in {'OCCViewer' 'VTKViewer'}", true );
mgr->insert( action( 213 ), -1, -1 ); // display only
- mgr->setRule( action( 213 ), "$isActiveViewer in {true} and selcount>0 and ($type in {'Shape' 'Group'} or ($type in {'Component'} and selcount=1))", true );
+ mgr->setRule( action( 213 ), "isActiveViewer=true and selcount>0 and ($type in {'Shape' 'Group'} or ($type in {'Component'} and selcount=1))", true );
mgr->insert( separator(), -1, -1 );
}