From 9023c3cda73e67d05aab45c366e2675298639388 Mon Sep 17 00:00:00 2001 From: jfa Date: Fri, 21 Dec 2012 08:58:22 +0000 Subject: [PATCH] Mantis issue 0021716: EDF 1679 : Create the bounding box in the GUI --- src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx | 25 +++++++++++++++++++++++++ src/MeasureGUI/MeasureGUI_BndBoxDlg.h | 2 ++ 2 files changed, 27 insertions(+) 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 -- 2.39.2