From: jfa Date: Fri, 21 Dec 2012 08:58:22 +0000 (+0000) Subject: Mantis issue 0021716: EDF 1679 : Create the bounding box in the GUI X-Git-Tag: V6_main_FINAL~83 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9023c3cda73e67d05aab45c366e2675298639388;p=modules%2Fgeom.git Mantis issue 0021716: EDF 1679 : Create the bounding box in the GUI --- diff --git a/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx b/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx index 5460c7e4f..062b94d7f 100644 --- a/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx @@ -150,6 +150,31 @@ bool MeasureGUI_BndBoxDlg::ClickOnApply() return true; } +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void MeasureGUI_BndBoxDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + + connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), + this, SLOT(SelectionIntoArgument())); + + globalSelection(); + displayPreview(true); +} + +//================================================================================= +// function : enterEvent() +// purpose : +//================================================================================= +void MeasureGUI_BndBoxDlg::enterEvent(QEvent*) +{ + if (!mainFrame()->GroupConstructors->isEnabled()) + ActivateThisDialog(); +} + //================================================================================= // function : processObject // purpose : diff --git a/src/MeasureGUI/MeasureGUI_BndBoxDlg.h b/src/MeasureGUI/MeasureGUI_BndBoxDlg.h index bb1e8971e..e2c5367f8 100644 --- a/src/MeasureGUI/MeasureGUI_BndBoxDlg.h +++ b/src/MeasureGUI/MeasureGUI_BndBoxDlg.h @@ -54,6 +54,7 @@ protected: private: void Init(); + void enterEvent (QEvent*); bool getParameters (double&, double&, double&, double&, double&, double&); private: @@ -64,6 +65,7 @@ private slots: void ClickOnOk(); bool ClickOnApply(); void SelectionIntoArgument(); + void ActivateThisDialog(); }; #endif // MEASUREGUI_BNDBOXDLG_H