]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0020170: EDF SMESH: Selection behaviour in object browser from hypothesis editing...
authoreap <eap@opencascade.com>
Tue, 24 Feb 2009 10:51:35 +0000 (10:51 +0000)
committereap <eap@opencascade.com>
Tue, 24 Feb 2009 10:51:35 +0000 (10:51 +0000)
+  int                          getActiveObject();

src/SMESHGUI/SMESHGUI_MeshDlg.cxx
src/SMESHGUI/SMESHGUI_MeshDlg.h

index ed323c097f9b73e5637749120c3abca5589798ac..61fa18f4ce9c2bf4c6cd40d44c5fe46e0911d42c 100644 (file)
@@ -602,3 +602,12 @@ void SMESHGUI_MeshDlg::onGeomPopup( int index )
 {
   emit geomSelectionByMesh( index == GEOM_BY_MESH_INDEX );
 }
+
+int SMESHGUI_MeshDlg::getActiveObject()
+{
+  for (int i = 0; i < 3; ++i )
+    if ( isObjectShown( i ) &&
+         (( QToolButton* )objectWg( i, Btn ))->isOn())
+      return i;
+  return -1;
+}
index 113f630cbcd884dc3629f32b187c252a914baa06..5c58f45f45dba2799c6def10ef4abce742dbe045 100644 (file)
@@ -78,7 +78,7 @@ public:
   void                         setGeomPopupEnabled( const bool );
   void                         disableTab(const int);
   void                         enableTab(const int);
-
+  int                          getActiveObject();
 
 signals: