mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 14:31:50 +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
23dacae944
commit
4f5a4eba24
2 changed files with 26 additions and 8 deletions
|
@ -352,12 +352,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -312,12 +312,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