Skip to content

Commit 7015a33

Browse files
Closes #319 add error message when trying to Save after creating a new model
1 parent 8014b9d commit 7015a33

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Lusas_Adapter/AdapterActions/Execute.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ public bool RunCommand(NewModel command)
7474

7575
public bool RunCommand(Save command)
7676
{
77+
if (d_LusasData.getDBFilename() == "")
78+
{
79+
Engine.Reflection.Compute.RecordError("The model file does not have a filename, please SaveAs before attempting to Save.");
80+
return false;
81+
}
82+
7783
d_LusasData.save();
7884

7985
return true;

0 commit comments

Comments
 (0)