X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_CreatePatternDlg.cxx;h=6b1f20e1287f6a4d3fcc29085ff6ff2aab22c77c;hb=0d232fb7040d63d364bcea108c001deabe561225;hp=28bb9ad0c5e05707628d1398d5994fee150ab6d1;hpb=a2f0f70d5912ea83c868916f06eaefb58a32ec2e;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx index 28bb9ad0c..6b1f20e12 100755 --- a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx @@ -88,9 +88,7 @@ SMESHGUI_CreatePatternDlg::SMESHGUI_CreatePatternDlg( SMESHGUI* theModule, : QDialog( SMESH::GetDesktop( theModule ), theName, false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu), mySMESHGUI( theModule ), - mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ), - myViewWindow( SMESH::GetViewWindow( theModule ) ), - mySelector( myViewWindow->GetSelector() ) + mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ) { setCaption(tr("CAPTION")); @@ -104,6 +102,9 @@ SMESHGUI_CreatePatternDlg::SMESHGUI_CreatePatternDlg( SMESHGUI* theModule, aDlgLay->setStretchFactor(aMainFrame, 1); + if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) + mySelector = aViewWindow->GetSelector(); + Init(theType); } @@ -386,7 +387,8 @@ void SMESHGUI_CreatePatternDlg::onSave() tr("ERROR_OF_SAVING"), QMessageBox::Ok); } else { //SUIT_Application::getDesktop()->setSelectionModes(ActorSelection); - myViewWindow->SetSelectionMode(ActorSelection); + if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) + aViewWindow->SetSelectionMode(ActorSelection); disconnect(mySelectionMgr, 0, this, 0); disconnect(mySMESHGUI, 0, this, 0); mySMESHGUI->ResetState(); @@ -435,7 +437,8 @@ void SMESHGUI_CreatePatternDlg::onOk() return; } else { //SUIT_Application::getDesktop()->setSelectionModes(ActorSelection); - myViewWindow->SetSelectionMode(ActorSelection); + if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) + aViewWindow->SetSelectionMode(ActorSelection); disconnect(mySelectionMgr, 0, this, 0); disconnect(mySMESHGUI, 0, this, 0); mySMESHGUI->ResetState(); @@ -454,7 +457,8 @@ void SMESHGUI_CreatePatternDlg::onOk() //======================================================================= void SMESHGUI_CreatePatternDlg::onClose() { - myViewWindow->SetSelectionMode(ActorSelection); + if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) + aViewWindow->SetSelectionMode(ActorSelection); disconnect(mySelectionMgr, 0, this, 0); disconnect(mySMESHGUI, 0, this, 0); mySMESHGUI->ResetState(); @@ -682,7 +686,8 @@ void SMESHGUI_CreatePatternDlg::activateSelection() { mySelectionMgr->clearFilters(); //SUIT_Application::getDesktop()->setSelectionModes(ActorSelection); - myViewWindow->SetSelectionMode(ActorSelection); + if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) + aViewWindow->SetSelectionMode(ActorSelection); if (myType == Type_2d) { mySelectionMgr->installFilter(new SMESH_NumberFilter