mirror of
https://github.com/chev2/gmod-addons.git
synced 2025-10-29 14:10:57 +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)
|
||||
-- If the spray already exists
|
||||
local existingSpray = self.Sprays[url]
|
||||
if existingSpray and IsValid(existingSpray) and IsValid(existingSpray:GetParent()) then
|
||||
existingSpray:GetParent():Remove()
|
||||
if existingSpray and IsValid(existingSpray) then
|
||||
existingSpray:Remove()
|
||||
self.Sprays[url] = nil
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue