//SUIT_Application::getDesktop()->setSelectionModes(ActorSelection);\r
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))\r
aViewWindow->SetSelectionMode(ActorSelection);\r
- //disconnect(mySelectionMgr, 0, this, 0);\r
- disconnect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionDone()));\r
+ disconnect(mySelectionMgr, 0, this, 0);\r
disconnect(mySMESHGUI, 0, this, 0);\r
mySMESHGUI->ResetState();\r
accept();\r
//=======================================================================\r
void SMESHGUI_CreatePatternDlg::enterEvent (QEvent*)\r
{\r
- mySMESHGUI->EmitSignalDeactivateDialog();\r
- setEnabled(true);\r
- activateSelection();\r
- connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));\r
+ // there is a stange problem that enterEvent() comes after onSave()\r
+ if ( isVisible () ) {\r
+ mySMESHGUI->EmitSignalDeactivateDialog();\r
+ setEnabled(true);\r
+ activateSelection();\r
+ connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));\r
+ }\r
}\r
\r
//=================================================================================\r