Skip to content

Commit

Permalink
Merge pull request #198 from openstudiocoalition/fix_crash_2
Browse files Browse the repository at this point in the history
Fixes crash on save when model directory is open in Explorer on Windows
  • Loading branch information
macumber authored Jul 31, 2020
2 parents b0dea15 + 170b449 commit ce243ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ build_profile/
build-profile/
core-build/
super-build/
debug/
release/
/super-build-shared/
/super-build-static/

Expand Down
5 changes: 4 additions & 1 deletion src/openstudio_lib/OSDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1379,7 +1379,10 @@ 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));

Expand Down

0 comments on commit ce243ac

Please sign in to comment.