From: eap Date: Tue, 24 Feb 2009 10:51:35 +0000 (+0000) Subject: 0020170: EDF SMESH: Selection behaviour in object browser from hypothesis editing... X-Git-Tag: V4_1_5rc1~36 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=2e2429b2910c9769bf79a9a19189d2f660058df0 0020170: EDF SMESH: Selection behaviour in object browser from hypothesis editing windows + int getActiveObject(); --- diff --git a/src/SMESHGUI/SMESHGUI_MeshDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshDlg.cxx index ed323c097..61fa18f4c 100644 --- a/src/SMESHGUI/SMESHGUI_MeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshDlg.cxx @@ -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; +} diff --git a/src/SMESHGUI/SMESHGUI_MeshDlg.h b/src/SMESHGUI/SMESHGUI_MeshDlg.h index 113f630cb..5c58f45f4 100644 --- a/src/SMESHGUI/SMESHGUI_MeshDlg.h +++ b/src/SMESHGUI/SMESHGUI_MeshDlg.h @@ -78,7 +78,7 @@ public: void setGeomPopupEnabled( const bool ); void disableTab(const int); void enableTab(const int); - + int getActiveObject(); signals: