From: vsv Date: Fri, 29 Nov 2019 09:06:00 +0000 (+0300) Subject: Issue #3098: Show warning windows. X-Git-Tag: V9_5_0a1~146 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6fc86589d9be950f95257752af95eef57bb53e30;p=modules%2Fshaper.git Issue #3098: Show warning windows. --- diff --git a/src/PartSet/PartSet_WidgetSketchLabel.cpp b/src/PartSet/PartSet_WidgetSketchLabel.cpp index 9dbab08eb..0a14abf97 100644 --- a/src/PartSet/PartSet_WidgetSketchLabel.cpp +++ b/src/PartSet/PartSet_WidgetSketchLabel.cpp @@ -79,6 +79,7 @@ #include #include #include +#include #ifndef DBL_MAX #define DBL_MAX 1.7976931348623158e+308 @@ -578,6 +579,12 @@ void PartSet_WidgetSketchLabel::activateCustom() } void PartSet_WidgetSketchLabel::showEvent(QShowEvent* theEvent) +{ + ModuleBase_WidgetValidated::showEvent(theEvent); + QTimer::singleShot(10, this, SLOT(onShowPanel())); +} + +void PartSet_WidgetSketchLabel::onShowPanel() { if (mySizeOfViewWidget->isVisible()) { DocumentPtr aDoc = feature()->document(); @@ -586,12 +593,12 @@ void PartSet_WidgetSketchLabel::showEvent(QShowEvent* theEvent) myPartSetMessage->move(mapToGlobal(geometry().bottomLeft())); myPartSetMessage->show(); } - mySizeMessage->move(mySizeOfView->mapToGlobal(mySizeOfView->geometry().center())); + QPoint aPnt = mySizeOfView->mapToGlobal(mySizeOfView->geometry().center()); + mySizeMessage->move(aPnt); mySizeMessage->show(); } } - void PartSet_WidgetSketchLabel::deactivate() { ModuleBase_WidgetValidated::deactivate(); diff --git a/src/PartSet/PartSet_WidgetSketchLabel.h b/src/PartSet/PartSet_WidgetSketchLabel.h index 51ad42aba..ba5c2bb50 100644 --- a/src/PartSet/PartSet_WidgetSketchLabel.h +++ b/src/PartSet/PartSet_WidgetSketchLabel.h @@ -217,6 +217,8 @@ private slots: void onShowDOF(); + void onShowPanel(); + private: /// Set sketch plane by shape /// \param theShape a planar face