From 91cdeec66bb0eb73a277729f58074269a8651848 Mon Sep 17 00:00:00 2001
From: Karsten Rink <karsten.rink@ufz.de>
Date: Fri, 25 Oct 2013 10:35:15 +0200
Subject: [PATCH] fixes issue where dialog would be closed if no geometry was
 selected

---
 Gui/DataView/GMSHPrefsDialog.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Gui/DataView/GMSHPrefsDialog.cpp b/Gui/DataView/GMSHPrefsDialog.cpp
index e1bfc49d55c..22cc50ed504 100644
--- a/Gui/DataView/GMSHPrefsDialog.cpp
+++ b/Gui/DataView/GMSHPrefsDialog.cpp
@@ -79,7 +79,7 @@ GMSHPrefsDialog::GMSHPrefsDialog(const GeoLib::GEOObjects* geoObjects, QDialog*
 	{
 		this->selectGeoButton->setDisabled(true);
 		this->deselectGeoButton->setDisabled(true);
-		list.append("(No geometry available.)");
+		list.append("[No geometry available.]");
 	}
 	_allGeo->setStringList(list);
 	this->allGeoView->setModel(_allGeo);
@@ -144,8 +144,8 @@ void GMSHPrefsDialog::accept()
 {
 	if (this->_selGeo->stringList().empty())
 	{
-		OGSError::box("No geometry loaded. Geometric data\n is necessary for mesh generation.");
-		this->done(QDialog::Rejected);
+		OGSError::box("No geometry selected. Geometric data\n is necessary for mesh generation.");
+		return;
 	}
 
 	std::vector<std::string> selectedObjects = this->getSelectedObjects(_selGeo->stringList());
-- 
GitLab