gui.cpp

changeset 42
499c25af0303
parent 41
4ca63da5546b
child 43
85b24285a8c7
--- a/gui.cpp	Wed Mar 20 02:31:36 2013 +0200
+++ b/gui.cpp	Wed Mar 20 02:44:21 2013 +0200
@@ -249,6 +249,14 @@
 }
 
 void ForgeWindow::slot_save () {
+	if (!~g_CurrentFile->zFileName) {
+		// If we don't have a file name, this is an anonymous file created
+		// with the new file command. We cannot save without a name so ask
+		// the user for one.
+		slot_saveAs ();
+		return;
+	}
+	
 	g_CurrentFile->save ();
 }
 

mercurial