mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-05-30 00:21:55 +00:00
Fixed crash when undoing newly added Things in Visual Mode.
Fixed Thing update in Visual Mode when the Thing type is changed.
This commit is contained in:
parent
d2ed251dc9
commit
e25fe882f2
2 changed files with 26 additions and 2 deletions
|
@ -2236,6 +2236,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Show linedef info
|
||||
public void ShowLinedefInfo(Linedef l)
|
||||
{
|
||||
if(l.IsDisposed)
|
||||
{
|
||||
HideInfo();
|
||||
return;
|
||||
}
|
||||
|
||||
lastinfoobject = l;
|
||||
modename.Visible = false;
|
||||
if(vertexinfo.Visible) vertexinfo.Hide();
|
||||
|
@ -2260,6 +2266,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Show vertex info
|
||||
public void ShowVertexInfo(Vertex v)
|
||||
{
|
||||
if(v.IsDisposed)
|
||||
{
|
||||
HideInfo();
|
||||
return;
|
||||
}
|
||||
|
||||
lastinfoobject = v;
|
||||
modename.Visible = false;
|
||||
if(linedefinfo.Visible) linedefinfo.Hide();
|
||||
|
@ -2275,6 +2287,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Show sector info
|
||||
public void ShowSectorInfo(Sector s)
|
||||
{
|
||||
if(s.IsDisposed)
|
||||
{
|
||||
HideInfo();
|
||||
return;
|
||||
}
|
||||
|
||||
lastinfoobject = s;
|
||||
modename.Visible = false;
|
||||
if(linedefinfo.Visible) linedefinfo.Hide();
|
||||
|
@ -2296,6 +2314,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
// Show thing info
|
||||
public void ShowThingInfo(Thing t)
|
||||
{
|
||||
if(t.IsDisposed)
|
||||
{
|
||||
HideInfo();
|
||||
return;
|
||||
}
|
||||
|
||||
lastinfoobject = t;
|
||||
modename.Visible = false;
|
||||
if(linedefinfo.Visible) linedefinfo.Hide();
|
||||
|
|
|
@ -602,7 +602,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// No sectors or geometry changed. So we only have
|
||||
// to update things when they have changed.
|
||||
foreach(KeyValuePair<Thing, VisualThing> vt in allthings)
|
||||
if(vt.Key.Marked) vt.Value.Update();
|
||||
if(vt.Key.Marked) (vt.Value as BaseVisualThing).Rebuild();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -622,7 +622,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
visiblethings.Clear();
|
||||
|
||||
// Make new blockmap
|
||||
if(sectorsmarked)
|
||||
if(sectorsmarked || General.Map.UndoRedo.PopulationChanged)
|
||||
FillBlockMap();
|
||||
|
||||
// Visibility culling (this re-creates the needed resources)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue