From ba8c2b4e701031d617961feb0ecd37830282f05d Mon Sep 17 00:00:00 2001 From: XXX Date: Sat, 25 Jul 2020 21:01:08 -0600 Subject: [PATCH 1/3] Fixes #177 Depends on NREL/OpenStudio#4026 --- src/openstudio_lib/OSDocument.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/openstudio_lib/OSDocument.cpp b/src/openstudio_lib/OSDocument.cpp index c8d8c779f..1595768a4 100644 --- a/src/openstudio_lib/OSDocument.cpp +++ b/src/openstudio_lib/OSDocument.cpp @@ -1379,7 +1379,9 @@ bool OSDocument::save() { // saves the model to modelTempDir / m_savePath.filename() // also copies the temp files to user location bool saved = saveModel(this->model(), modelPath, toPath(m_modelTempDir)); - OS_ASSERT(saved); + if (!saved) { + QMessageBox::warning(this->mainWindow(), tr("Failed to save model"), tr("Failed to save model, make sure that you do not have the location open and that you have correct write access.")); + } this->setSavePath(toQString(modelPath)); From 36cbf323e58017bf60ee8967aa751da2fe2fe61a Mon Sep 17 00:00:00 2001 From: XXX Date: Sat, 25 Jul 2020 21:01:28 -0600 Subject: [PATCH 2/3] Add debug and release folders to gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 1e210c2bd..ee34a85dc 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,8 @@ build_profile/ build-profile/ core-build/ super-build/ +debug/ +release/ /super-build-shared/ /super-build-static/ From 170b449509a6af567c165c5a00d3fd9d5910685f Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Mon, 27 Jul 2020 16:58:46 +0200 Subject: [PATCH 3/3] Clang format --- src/openstudio_lib/OSDocument.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/openstudio_lib/OSDocument.cpp b/src/openstudio_lib/OSDocument.cpp index 1595768a4..9882dd1e3 100644 --- a/src/openstudio_lib/OSDocument.cpp +++ b/src/openstudio_lib/OSDocument.cpp @@ -1380,7 +1380,8 @@ bool OSDocument::save() { // also copies the temp files to user location bool saved = saveModel(this->model(), modelPath, toPath(m_modelTempDir)); if (!saved) { - QMessageBox::warning(this->mainWindow(), tr("Failed to save model"), tr("Failed to save model, make sure that you do not have the location open and that you have correct write access.")); + QMessageBox::warning(this->mainWindow(), tr("Failed to save model"), + tr("Failed to save model, make sure that you do not have the location open and that you have correct write access.")); } this->setSavePath(toQString(modelPath));