Skip to content

Commit

Permalink
try a different fix instead
Browse files Browse the repository at this point in the history
it was related to parts being initialized on creation, instead of the tree's validity. the part's tree node field has a chance to not exist yet at that point in time
  • Loading branch information
pingu7867 authored Dec 14, 2023
1 parent f82ef58 commit 0d703b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/pac3/editor/client/panels/properties.lua
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ end)

pac.AddHook("PostRenderVGUI", "flash_properties", function()
if not pace.flashes then return end
if not IsValid(pace.tree) or not IsValid(pace.properties) then return end
for pnl, tbl in pairs(pace.flashes) do
if IsValid(pnl) then
--print(pnl:LocalToScreen(0,0))
Expand Down Expand Up @@ -352,7 +351,9 @@ do -- container
end

do --scroll to the tree node
pace.tree:ScrollToChild(self:GetChildren()[1].part.pace_tree_node)
if self:GetChildren()[1].part.pace_tree_node then
pace.tree:ScrollToChild(self:GetChildren()[1].part.pace_tree_node)
end
end

end
Expand Down

0 comments on commit 0d703b6

Please sign in to comment.