From: akl Date: Fri, 25 Oct 2013 08:17:17 +0000 (+0000) Subject: Correct modes interaction X-Git-Tag: BR_hydro_v_0_3~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1b285d81c41ee9e312fb6b5ee4476a20f746017a;p=modules%2Fgeom.git Correct modes interaction --- diff --git a/src/CurveCreator/CurveCreator_Widget.cxx b/src/CurveCreator/CurveCreator_Widget.cxx index b741dca4d..32950c120 100644 --- a/src/CurveCreator/CurveCreator_Widget.cxx +++ b/src/CurveCreator/CurveCreator_Widget.cxx @@ -246,7 +246,7 @@ void CurveCreator_Widget::onSelectionChanged() anEnabledAct << UP_ID; } if( aSelSections.size() == 1 ){ - anEnabledAct << CREATION_MODE_ID << EDITION_MODE_ID; + anEnabledAct << CREATION_MODE_ID << EDITION_MODE_ID << DETECTION_MODE_ID; } if( aSelSections[ aSelSections.size() - 1 ] < ( myCurve->getNbSections() - 1 ) ){ anEnabledAct << DOWN_ID; @@ -361,16 +361,22 @@ void CurveCreator_Widget::onModeChanged(bool checked) QAction* anAction = (QAction*)sender(); switch(myActionMap.key(anAction)) { case CREATION_MODE_ID: - myActionMap[EDITION_MODE_ID]->setChecked(false); - myActionMap[DETECTION_MODE_ID]->setChecked(false); + if (myActionMap[EDITION_MODE_ID]->isChecked()) + myActionMap[EDITION_MODE_ID]->trigger(); + else if (myActionMap[DETECTION_MODE_ID]->isChecked()) + myActionMap[DETECTION_MODE_ID]->trigger(); break; case EDITION_MODE_ID: - myActionMap[CREATION_MODE_ID]->setChecked(false); - myActionMap[DETECTION_MODE_ID]->setChecked(false); + if (myActionMap[CREATION_MODE_ID]->isChecked()) + myActionMap[CREATION_MODE_ID]->trigger(); + else if (myActionMap[DETECTION_MODE_ID]->isChecked()) + myActionMap[DETECTION_MODE_ID]->trigger(); break; case DETECTION_MODE_ID: - myActionMap[CREATION_MODE_ID]->setChecked(false); - myActionMap[EDITION_MODE_ID]->setChecked(false); + if (myActionMap[CREATION_MODE_ID]->isChecked()) + myActionMap[CREATION_MODE_ID]->trigger(); + else if (myActionMap[EDITION_MODE_ID]->isChecked()) + myActionMap[EDITION_MODE_ID]->trigger(); break; } } diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index 7fcf0a08e..76d3c2e74 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -5335,6 +5335,14 @@ Ignoring units will cause model scaling (as dimensions are supposed to be specif EDITION_MODE_TLT Edition mode + + DETECTION_MODE + Detection mode + + + DETECTION_MODE_TLT + Detection mode + INSERT_POINT_BEFORE Insert point before