mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-27 06:02:11 +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
|
// Reset grouping
|
||||||
lastgroup = UndoGroup.None;
|
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
|
// Remove selection
|
||||||
General.Map.Map.ClearAllMarks(false);
|
General.Map.Map.ClearAllMarks(false);
|
||||||
General.Map.Map.ClearAllSelected();
|
General.Map.Map.ClearAllSelected();
|
||||||
|
@ -448,10 +455,17 @@ namespace CodeImp.DoomBuilder.Editing
|
||||||
// Reset grouping
|
// Reset grouping
|
||||||
lastgroup = UndoGroup.None;
|
lastgroup = UndoGroup.None;
|
||||||
|
|
||||||
// Change map set
|
lock(r)
|
||||||
if(r.IsOnDisk) { r.StoreOnDisk = false; r.RestoreFromFile(); }
|
{
|
||||||
General.Map.ChangeMapSet(new MapSet(r.MapData));
|
// Change map set
|
||||||
|
if(r.IsOnDisk)
|
||||||
|
{
|
||||||
|
r.StoreOnDisk = false;
|
||||||
|
r.RestoreFromFile();
|
||||||
|
}
|
||||||
|
General.Map.ChangeMapSet(new MapSet(r.MapData));
|
||||||
|
}
|
||||||
|
|
||||||
// Remove selection
|
// Remove selection
|
||||||
General.Map.Map.ClearAllMarks(false);
|
General.Map.Map.ClearAllMarks(false);
|
||||||
General.Map.Map.ClearAllSelected();
|
General.Map.Map.ClearAllSelected();
|
||||||
|
|
Loading…
Reference in a new issue