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
|
@ -373,11 +373,18 @@ 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);
|
||||
General.Map.Map.ClearAllSelected();
|
||||
|
@ -448,10 +455,17 @@ 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);
|
||||
General.Map.Map.ClearAllSelected();
|
||||
|
|
Loading…
Reference in a new issue