]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #3098: Show warning windows.
authorvsv <vsv@opencascade.com>
Fri, 29 Nov 2019 09:06:00 +0000 (12:06 +0300)
committervsv <vsv@opencascade.com>
Fri, 29 Nov 2019 09:06:00 +0000 (12:06 +0300)
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/PartSet/PartSet_WidgetSketchLabel.h

index 9dbab08eb7c78655152a2f9d2606b876919c2295..0a14abf97dc356d03dd68d6a76c81ebb34ad22d4 100644 (file)
@@ -79,6 +79,7 @@
 #include <QLineEdit>
 #include <QDoubleValidator>
 #include <QDialog>
+#include <QTimer>
 
 #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();
index 51ad42abaaac1c9da4f8fdbee92a65bf155f8936..ba5c2bb50185909acf9f1e81bb5950cdd459a628 100644 (file)
@@ -217,6 +217,8 @@ private slots:
 
   void onShowDOF();
 
+  void onShowPanel();
+
 private:
   /// Set sketch plane by shape
   /// \param theShape a planar face