From 36c42dbef151e7a91c56a7c84c81d130533d8d84 Mon Sep 17 00:00:00 2001 From: codeimp Date: Thu, 11 Jun 2009 21:50:55 +0000 Subject: [PATCH] @ fixed a bug in the undo/redo system --- Source/Core/Editing/UndoManager.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/Core/Editing/UndoManager.cs b/Source/Core/Editing/UndoManager.cs index 63780d9a..b8cc46cc 100644 --- a/Source/Core/Editing/UndoManager.cs +++ b/Source/Core/Editing/UndoManager.cs @@ -895,6 +895,7 @@ namespace CodeImp.DoomBuilder.Editing Vertex v = (vindex >= 0) ? General.Map.Map.GetVertexByIndex(vindex) : null; l.SetStartVertex(v); l.Marked = true; + if(v != null) v.Marked = true; } internal void RecRefLinedefEnd(Linedef l) @@ -917,6 +918,7 @@ namespace CodeImp.DoomBuilder.Editing Vertex v = (vindex >= 0) ? General.Map.Map.GetVertexByIndex(vindex) : null; l.SetEndVertex(v); l.Marked = true; + if(v != null) v.Marked = true; } internal void RecRefLinedefFront(Linedef l) @@ -939,7 +941,7 @@ namespace CodeImp.DoomBuilder.Editing Sidedef sd = (sindex >= 0) ? General.Map.Map.GetSidedefByIndex(sindex) : null; l.AttachFront(sd); l.Marked = true; - sd.Marked = true; + if(sd != null) sd.Marked = true; } internal void RecRefLinedefBack(Linedef l) @@ -962,7 +964,7 @@ namespace CodeImp.DoomBuilder.Editing Sidedef sd = (sindex >= 0) ? General.Map.Map.GetSidedefByIndex(sindex) : null; l.AttachBack(sd); l.Marked = true; - sd.Marked = true; + if(sd != null) sd.Marked = true; } internal void RecAddSidedef(Sidedef s) @@ -1051,7 +1053,7 @@ namespace CodeImp.DoomBuilder.Editing Sector sc = (sindex >= 0) ? General.Map.Map.GetSectorByIndex(sindex) : null; sd.SetSector(sc); sd.Marked = true; - sc.Marked = true; + if(sc != null) sc.Marked = true; } internal void RecAddSector(Sector s)