Salome HOME
0020170: EDF SMESH: Selection behaviour in object browser from hypothesis editing...
authoreap <eap@opencascade.com>
Tue, 24 Feb 2009 09:23:25 +0000 (09:23 +0000)
committereap <eap@opencascade.com>
Tue, 24 Feb 2009 09:23:25 +0000 (09:23 +0000)
+  int                          getActiveObject();

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

index b877f7fc076810d2506e1031f3f9ef8df6273fd3..e293f887416821ce709a21f0ac9c62768466011b 100644 (file)
@@ -586,3 +586,12 @@ void SMESHGUI_MeshDlg::onGeomPopup( QAction* a )
 {
   emit geomSelectionByMesh( a->data().toInt() == GEOM_BY_MESH_INDEX );
 }
+
+int SMESHGUI_MeshDlg::getActiveObject()
+{
+  for (int i = 0; i < 3; ++i )
+    if ( isObjectShown( i ) &&
+         (( QToolButton* )objectWg( i, Btn ))->isChecked())
+      return i;
+  return -1;
+}
index 34ee3a565c3884f16a30de408ad683a75c87d7d5..94eefd5d744a0ac00ea1b261aaca0fd893a072b5 100644 (file)
@@ -71,7 +71,7 @@ public:
   void                         setGeomPopupEnabled( const bool );
   void                         disableTab(const int);
   void                         enableTab(const int);
-
+  int                          getActiveObject();
 
 signals:
   void                         hypoSet( const QString& );