src/file.cpp

changeset 265
955c0aabfebf
parent 254
434c9844e45d
child 266
12e7302f14e9
--- a/src/file.cpp	Tue May 28 18:30:40 2013 +0300
+++ b/src/file.cpp	Sat Jun 01 03:17:52 2013 +0300
@@ -351,7 +351,7 @@
 	setlocale (LC_ALL, "C");
 	
 	// If we have unsaved changes, warn and give the option of saving.
-	if (!implicit () && History::pos () != savePos ()) {
+	if (!implicit () && history ().pos () != savePos ()) {
 		switch (QMessageBox::question (g_win, "Unsaved Changes",
 			fmt ("There are unsaved changes to %s. Should it be saved?",
 			(name ().len () > 0) ? name ().c () : "<anonymous>"),
@@ -425,8 +425,6 @@
 	g_loadedFiles << f;
 	g_curfile = f;
 	
-	History::clear ();
-	
 	g_BBox.reset ();
 	g_win->R ()->setFile (f);
 	g_win->fullRefresh ();
@@ -500,8 +498,6 @@
 	g_win->R ()->setFile (file);
 	g_win->R ()->resetAngles ();
 	
-	History::clear ();
-	
 	// Add it to the recent files list.
 	addRecentFile (path);
 	g_loadingMainFile = false;
@@ -549,7 +545,7 @@
 	fclose (fp);
 	
 	// We have successfully saved, update the save position now.
-	setSavePos (History::pos ());
+	setSavePos (history ().pos ());
 	setName (savepath);
 	
 	g_win->updateTitle ();

mercurial