behavior update

Tue, 16 Jul 2013 02:09:22 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Tue, 16 Jul 2013 02:09:22 +0300
changeset 390
57be36dfa55e
parent 389
ccb763dbe98e
child 391
beef61ce962a

behavior update

src/file.cpp file | annotate | diff | comparison | revisions
--- a/src/file.cpp	Tue Jul 16 02:06:30 2013 +0300
+++ b/src/file.cpp	Tue Jul 16 02:09:22 2013 +0300
@@ -531,6 +531,11 @@
 	
 	file->setImplicit (false);
 	
+	// If we have an anonymous, unchanged file open as the only open file
+	// (aside of the one we just opened), close it now.
+	if (g_loadedFiles.size() == 2 && g_loadedFiles[0]->name() == "" && !g_loadedFiles[0]->hasUnsavedChanges())
+		delete g_loadedFiles[0];
+	
 	// Rebuild the object tree view now.
 	g_win->fullRefresh();
 	g_win->updateTitle();

mercurial