src/history.cc

changeset 594
d9feccafcbf7
parent 563
10939452bf86
child 600
209e3f1f7b2c
--- a/src/history.cc	Mon Dec 23 16:29:44 2013 +0200
+++ b/src/history.cc	Sun Dec 29 16:24:41 2013 +0200
@@ -23,8 +23,6 @@
 #include "gui.h"
 #include "gldraw.h"
 
-bool g_fullRefresh = false;
-
 // =============================================================================
 // -----------------------------------------------------------------------------
 History::History() :
@@ -40,7 +38,6 @@
 	setIgnoring (true);
 
 	const Changeset& set = getChangeset (getPosition());
-	g_fullRefresh = false;
 
 	// Iterate the list in reverse and undo all actions
 	for (int i = set.size() - 1; i >= 0; --i)
@@ -49,12 +46,7 @@
 	}
 
 	decreasePosition();
-
-	if (!g_fullRefresh)
-		g_win->refresh();
-	else
-		g_win->doFullRefresh();
-
+	g_win->refresh();
 	g_win->updateActions();
 	dlog ("Position is now %1", getPosition());
 	setIgnoring (false);
@@ -68,19 +60,13 @@
 
 	setIgnoring (true);
 	const Changeset& set = getChangeset (getPosition() + 1);
-	g_fullRefresh = false;
 
 	// Redo things - in the order as they were done in the first place
 	for (const AbstractHistoryEntry* change : set)
 		change->redo();
 
 	setPosition (getPosition() + 1);
-
-	if (!g_fullRefresh)
-		g_win->refresh();
-	else
-		g_win->doFullRefresh();
-
+	g_win->refresh();
 	g_win->updateActions();
 	dlog ("Position is now %1", getPosition());
 	setIgnoring (false);
@@ -137,7 +123,6 @@
 void AddHistory::undo() const
 {	LDObject* obj = getParent()->getFile()->getObject (getIndex());
 	obj->deleteSelf();
-	g_fullRefresh = true;
 }
 
 // =============================================================================
@@ -168,7 +153,6 @@
 void DelHistory::redo() const
 {	LDObject* obj = getParent()->getFile()->getObject (getIndex());
 	obj->deleteSelf();
-	g_fullRefresh = true;
 }
 
 // =============================================================================

mercurial