Join modifications from V3_2_0_maintainance branch

This commit is contained in:
jfa 2007-08-31 08:09:54 +00:00
parent 588cdb9462
commit b46430fa97

View File

@ -132,8 +132,8 @@ void EntityGUI_SubShapeDlg::Init()
connect(GroupPoints->ComboBox1, SIGNAL(activated(int)), this, SLOT(ComboTextChanged())); connect(GroupPoints->ComboBox1, SIGNAL(activated(int)), this, SLOT(ComboTextChanged()));
connect(GroupPoints->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(SubShapeToggled())); connect(GroupPoints->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(SubShapeToggled()));
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), connect(myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
updateButtonState(); updateButtonState();
@ -175,7 +175,12 @@ bool EntityGUI_SubShapeDlg::ClickOnApply()
} }
} }
return onAccept(); bool isOk = onAccept();
// restore selection, corresponding to current selection mode
SubShapeToggled();
return isOk;
} }
@ -340,8 +345,8 @@ void EntityGUI_SubShapeDlg::DeactivateActiveDialog()
void EntityGUI_SubShapeDlg::ActivateThisDialog() void EntityGUI_SubShapeDlg::ActivateThisDialog()
{ {
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), connect(myGeomGUI->getApp()->selectionMgr(),
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
SubShapeToggled(); SubShapeToggled();
updateButtonState(); updateButtonState();
} }
@ -529,7 +534,7 @@ bool EntityGUI_SubShapeDlg::isValid( QString& msg )
if ( aResult && !anObj->_is_nil() ) { if ( aResult && !anObj->_is_nil() ) {
TColStd_IndexedMapOfInteger aMapIndex; TColStd_IndexedMapOfInteger aMapIndex;
((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr()->GetIndexes( firstIObject(), aMapIndex ); myGeomGUI->getApp()->selectionMgr()->GetIndexes( firstIObject(), aMapIndex );
isOk = aMapIndex.Extent() > 0; isOk = aMapIndex.Extent() > 0;
if ( !isOk ) if ( !isOk )
msg += tr( "NO_SUBSHAPES_SELECTED" ); msg += tr( "NO_SUBSHAPES_SELECTED" );
@ -562,7 +567,7 @@ bool EntityGUI_SubShapeDlg::execute( ObjectList& objects )
if ( aResult && !anObj->_is_nil() ) { if ( aResult && !anObj->_is_nil() ) {
TColStd_IndexedMapOfInteger aMapIndex; TColStd_IndexedMapOfInteger aMapIndex;
((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr()->GetIndexes( firstIObject(), aMapIndex ); myGeomGUI->getApp()->selectionMgr()->GetIndexes( firstIObject(), aMapIndex );
GEOM::GEOM_ILocalOperations_var aLocOp = GEOM::GEOM_ILocalOperations_var aLocOp =
getGeomEngine()->GetILocalOperations( getStudyId() ); getGeomEngine()->GetILocalOperations( getStudyId() );