From: eap Date: Tue, 24 Feb 2009 09:23:25 +0000 (+0000) Subject: 0020170: EDF SMESH: Selection behaviour in object browser from hypothesis editing... X-Git-Tag: V5_1_1a2~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2142c9f70fb9210b1d42111d523de4f1f87cd126;p=modules%2Fsmesh.git 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 b877f7fc0..e293f8874 100644 --- a/src/SMESHGUI/SMESHGUI_MeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshDlg.cxx @@ -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; +} diff --git a/src/SMESHGUI/SMESHGUI_MeshDlg.h b/src/SMESHGUI/SMESHGUI_MeshDlg.h index 34ee3a565..94eefd5d7 100644 --- a/src/SMESHGUI/SMESHGUI_MeshDlg.h +++ b/src/SMESHGUI/SMESHGUI_MeshDlg.h @@ -71,7 +71,7 @@ public: void setGeomPopupEnabled( const bool ); void disableTab(const int); void enableTab(const int); - + int getActiveObject(); signals: void hypoSet( const QString& );