mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 12:22:35 +00:00
@ Fixed a race condition in Undo/Redo storage system
This commit is contained in:
parent
4e064d78cd
commit
29b797b4f3
1 changed files with 22 additions and 8 deletions
|
@ -374,9 +374,16 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
// Reset grouping
|
||||
lastgroup = UndoGroup.None;
|
||||
|
||||
// Change map set
|
||||
if(u.IsOnDisk) { u.StoreOnDisk = false; u.RestoreFromFile(); }
|
||||
General.Map.ChangeMapSet(new MapSet(u.MapData));
|
||||
lock(u)
|
||||
{
|
||||
// Change map set
|
||||
if(u.IsOnDisk)
|
||||
{
|
||||
u.StoreOnDisk = false;
|
||||
u.RestoreFromFile();
|
||||
}
|
||||
General.Map.ChangeMapSet(new MapSet(u.MapData));
|
||||
}
|
||||
|
||||
// Remove selection
|
||||
General.Map.Map.ClearAllMarks(false);
|
||||
|
@ -448,9 +455,16 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
// Reset grouping
|
||||
lastgroup = UndoGroup.None;
|
||||
|
||||
// Change map set
|
||||
if(r.IsOnDisk) { r.StoreOnDisk = false; r.RestoreFromFile(); }
|
||||
General.Map.ChangeMapSet(new MapSet(r.MapData));
|
||||
lock(r)
|
||||
{
|
||||
// Change map set
|
||||
if(r.IsOnDisk)
|
||||
{
|
||||
r.StoreOnDisk = false;
|
||||
r.RestoreFromFile();
|
||||
}
|
||||
General.Map.ChangeMapSet(new MapSet(r.MapData));
|
||||
}
|
||||
|
||||
// Remove selection
|
||||
General.Map.Map.ClearAllMarks(false);
|
||||
|
|
Loading…
Reference in a new issue