X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_ScaleDlg.cxx;h=1e712f0a348148f80ff5c8ed8100e4de4835c852;hb=abd8d64dea038a7accb9a2d166e942c26d634b2a;hp=df0989317ec2d6a9d0339e1ae721d6de35b19182;hpb=6c4a9f32ed7b4416d79e0d0d293919609a8eb178;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx b/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx index df0989317..1e712f0a3 100644 --- a/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx @@ -308,7 +308,10 @@ SMESHGUI_ScaleDlg::SMESHGUI_ScaleDlg( SMESHGUI* theModule ) : connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog())); connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); /* to close dialog if study change */ - connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject())); + connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(reject())); + connect(mySMESHGUI, SIGNAL(SignalActivatedViewManager()), this, SLOT(onOpenView())); + connect(mySMESHGUI, SIGNAL(SignalCloseView()), this, SLOT(onCloseView())); + connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&))); connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool))); connect(ActionGroup, SIGNAL(buttonClicked(int)), SLOT(onActionClicked(int))); @@ -605,6 +608,31 @@ void SMESHGUI_ScaleDlg::reject() QDialog::reject(); } +//================================================================================= +// function : onOpenView() +// purpose : +//================================================================================= +void SMESHGUI_ScaleDlg::onOpenView() +{ + if ( mySelector ) { + SMESH::SetPointRepresentation(false); + } + else { + mySelector = SMESH::GetViewWindow( mySMESHGUI )->GetSelector(); + ActivateThisDialog(); + } +} + +//================================================================================= +// function : onCloseView() +// purpose : +//================================================================================= +void SMESHGUI_ScaleDlg::onCloseView() +{ + DeactivateActiveDialog(); + mySelector = 0; +} + //================================================================================= // function : ClickOnHelp() // purpose : @@ -944,8 +972,13 @@ void SMESHGUI_ScaleDlg::ActivateThisDialog() //================================================================================= void SMESHGUI_ScaleDlg::enterEvent (QEvent*) { - if (!ConstructorsBox->isEnabled()) + if (!ConstructorsBox->isEnabled()) { + SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ); + if ( aViewWindow && !mySelector) { + mySelector = aViewWindow->GetSelector(); + } ActivateThisDialog(); + } } //=======================================================================