From 1ba84ea5bf441b650eed4bc2931e7879702c3efd Mon Sep 17 00:00:00 2001
From: schultz <schultz>
Date: Wed, 12 Jul 2017 14:27:45 +0200
Subject: [PATCH] added parent Widget parameter to VSI selection widget, as
 creating a dialog without parent seems to be blocking in windows. nesting
 parentless dialogs then causes the root dialog to keep focus while the nested
 dialog is on top

---
 types/objectId/objectIdWidget.cc   | 2 +-
 types/objectId/objectPickDialog.cc | 4 ++--
 types/objectId/objectPickDialog.hh | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/types/objectId/objectIdWidget.cc b/types/objectId/objectIdWidget.cc
index ae59732..2605ffa 100644
--- a/types/objectId/objectIdWidget.cc
+++ b/types/objectId/objectIdWidget.cc
@@ -183,7 +183,7 @@ void ObjectIdWidget::toDefault()
 
 void ObjectIdWidget::showPickDialog()
 {
-  ObjectPickDialog d(flags_, types_, withGroups_);
+  ObjectPickDialog d(this, flags_, types_, withGroups_);
   d.selectedId (combo_->itemData (combo_->currentIndex()).toInt ());
 
   if (d.exec () == QDialog::Accepted)
diff --git a/types/objectId/objectPickDialog.cc b/types/objectId/objectPickDialog.cc
index 18344e5..a145ab8 100644
--- a/types/objectId/objectPickDialog.cc
+++ b/types/objectId/objectPickDialog.cc
@@ -70,8 +70,8 @@ namespace VSI {
 //=============================================================================
 
 /// Constructor
-ObjectPickDialog::ObjectPickDialog(QStringList _flags, QStringList _types, bool _withGroups) :
-  QDialog (),
+ObjectPickDialog::ObjectPickDialog(QWidget* parent, QStringList _flags, QStringList _types, bool _withGroups) :
+  QDialog (parent),
   selectedId_(0)
 {
   QHBoxLayout *hL = new QHBoxLayout;
diff --git a/types/objectId/objectPickDialog.hh b/types/objectId/objectPickDialog.hh
index 638e412..93e12f1 100644
--- a/types/objectId/objectPickDialog.hh
+++ b/types/objectId/objectPickDialog.hh
@@ -78,7 +78,7 @@ class ObjectPickDialog : public QDialog {
 
   public:
     /// Constructor
-    ObjectPickDialog (QStringList _flags, QStringList _types, bool _withGroups);
+    ObjectPickDialog (QWidget* parent, QStringList _flags, QStringList _types, bool _withGroups);
 
     /// Destructor
     ~ObjectPickDialog ();
-- 
GitLab