- Little bit of undo/redo optimization

This commit is contained in:
codeimp 2010-01-09 19:49:54 +00:00
parent 837c725395
commit 6f1abda51f

View file

@ -628,6 +628,7 @@ namespace CodeImp.DoomBuilder.Editing
geometrychanged = false;
populationchanged = false;
General.Map.Map.ClearAllMarks(false);
General.Map.Map.BeginAddRemove();
// Go for all levels to undo
for(int lvl = 0; lvl < levels; lvl++)
@ -706,6 +707,8 @@ namespace CodeImp.DoomBuilder.Editing
levelsundone++;
}
General.Map.Map.EndAddRemove();
if(levels > 1)
General.Interface.DisplayStatus(StatusType.Action, "Undone " + levelsundone + " changes.");
@ -765,6 +768,7 @@ namespace CodeImp.DoomBuilder.Editing
geometrychanged = false;
populationchanged = false;
General.Map.Map.ClearAllMarks(false);
General.Map.Map.BeginAddRemove();
// Go for all levels to redo
for(int lvl = 0; lvl < levels; lvl++)
@ -822,7 +826,7 @@ namespace CodeImp.DoomBuilder.Editing
}
General.WriteLogLine("Performing redo \"" + r.Description + "\", Ticket ID " + r.TicketID + "...");
if(levels == 1)
General.Interface.DisplayStatus(StatusType.Action, r.Description + " redone.");
@ -842,6 +846,8 @@ namespace CodeImp.DoomBuilder.Editing
levelsundone++;
}
General.Map.Map.EndAddRemove();
if(levels > 1)
General.Interface.DisplayStatus(StatusType.Action, "Redone " + levelsundone + " changes.");