X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_Selection.cxx;h=1c99de1d85176c7e9cd25d17ce726f604f3c6cf3;hp=80ca0346658b215125ed614f352ff6779bbe1d81;hb=b22e182dd1a2c30be324b21074158390d00714b3;hpb=b0a908c0d20341651771d0249fb10882f54b2aad diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index 80ca03466..1c99de1d8 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -80,8 +80,10 @@ void SMESHGUI_Selection::init( const QString& client, LightApp_SelectionMgr* mgr return; _PTR(Study) aStudy = aSStudy->studyDS(); - for( int i=0, n=count(); iGetScalarBarActor() && actor->GetScalarBarActor()->GetDistributionVisibility()); } +//======================================================================= +//function : isScalarBarVisible +//purpose : Visible/Invisible Scalar Bar +//======================================================================= + +bool SMESHGUI_Selection::isScalarBarVisible(int ind) const { + SMESH_Actor* actor = getActor( ind ); + return (actor && actor->GetScalarBarActor() && actor->GetScalarBarActor()->GetVisibility()); +} + //======================================================================= //function : shrinkMode //purpose : return either 'IsSrunk', 'IsNotShrunk' or 'IsNotShrinkable' @@ -318,6 +345,23 @@ QString SMESHGUI_Selection::controlMode( int ind ) const return mode; } +//======================================================================= +//function : controlMode +//purpose : gets global control mode; return SMESH_Actor::eControl +//======================================================================= +QString SMESHGUI_Selection::controlMode() const +{ + if( myControls.count() > 0 ) { + QString mode = myControls[0]; + for( int ind = 1; ind < myControls.count(); ind++ ) { + if( mode != myControls[ind] ) + return "eNone"; + } + return mode; + } + return "eNone"; +} + bool SMESHGUI_Selection::isNumFunctor( int ind ) const { bool result = false;