mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Visual Mode: fixed a problem where pasting a texture to a 3D floor sometimes didn't show the pasted texture immediately
This commit is contained in:
parent
b31dec526c
commit
6f7b24291d
2 changed files with 26 additions and 8 deletions
|
@ -419,12 +419,21 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
SetTexture(BuilderPlug.Me.CopiedFlat);
|
||||
|
||||
// Update
|
||||
if(mode.VisualSectorExists(level.sector))
|
||||
// Update. We need to create a visual sector if it doesn't exist yet. This can happen when pasting
|
||||
// to a 3D floor and its control sector wasn't in view before
|
||||
BaseVisualSector vs;
|
||||
|
||||
if (mode.VisualSectorExists(level.sector))
|
||||
{
|
||||
BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(level.sector);
|
||||
vs.UpdateSectorGeometry(false);
|
||||
vs = (BaseVisualSector)mode.GetVisualSector(level.sector);
|
||||
}
|
||||
else
|
||||
{
|
||||
vs = mode.CreateBaseVisualSector(level.sector);
|
||||
}
|
||||
|
||||
if (vs != null)
|
||||
vs.UpdateSectorGeometry(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -401,12 +401,21 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
SetTexture(BuilderPlug.Me.CopiedFlat);
|
||||
|
||||
// Update
|
||||
if(mode.VisualSectorExists(level.sector))
|
||||
// Update. We need to create a visual sector if it doesn't exist yet. This can happen when pasting
|
||||
// to a 3D floor and its control sector wasn't in view before
|
||||
BaseVisualSector vs;
|
||||
|
||||
if (mode.VisualSectorExists(level.sector))
|
||||
{
|
||||
BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(level.sector);
|
||||
vs.UpdateSectorGeometry(false);
|
||||
vs = (BaseVisualSector)mode.GetVisualSector(level.sector);
|
||||
}
|
||||
else
|
||||
{
|
||||
vs = mode.CreateBaseVisualSector(level.sector);
|
||||
}
|
||||
|
||||
if (vs != null)
|
||||
vs.UpdateSectorGeometry(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue