mirror of
https://github.com/chev2/gmod-addons.git
synced 2025-10-30 06:31:35 +00:00
SprayMesh Extended: Fix layout breaking if adding an existing spray
It used old code where the spray was inside a container panel. The container panel isn't used anymore, calling GetParent would mistakenly remove the DIconLayout
This commit is contained in:
parent
421e33b6f6
commit
efb61d9672
1 changed files with 2 additions and 2 deletions
|
|
@ -362,8 +362,8 @@ local MAT_FAKE_TRANSPARENT = Material("spraymesh/fake_transparent.png", "noclamp
|
||||||
function PANEL:AddSpray(url, name)
|
function PANEL:AddSpray(url, name)
|
||||||
-- If the spray already exists
|
-- If the spray already exists
|
||||||
local existingSpray = self.Sprays[url]
|
local existingSpray = self.Sprays[url]
|
||||||
if existingSpray and IsValid(existingSpray) and IsValid(existingSpray:GetParent()) then
|
if existingSpray and IsValid(existingSpray) then
|
||||||
existingSpray:GetParent():Remove()
|
existingSpray:Remove()
|
||||||
self.Sprays[url] = nil
|
self.Sprays[url] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue