Skip to content

Commit

Permalink
Fixed material list not updating in room tool
Browse files Browse the repository at this point in the history
updateLayerList now sends the actual tool along instead of undefined variable
  • Loading branch information
Cruor committed Aug 12, 2024
1 parent ea87491 commit 78f729f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ui/windows/tools.lua
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,10 @@ local function updateLayerList(toolName, tool)

else
toolWindow.layerPanel:removeSelf()

-- Always update material list if the layer list is invisible
-- Layer item callback will never happen and the material list will be stuck
toolWindow.materialList:updateItems(getMaterialItems("fake_layer_name"))
end

toolWindow.layerPanelVisible = newVisible
Expand Down Expand Up @@ -553,7 +557,7 @@ local function toolCallback(list, toolName)
toolWindow.eventStates.material = nil

toolHandler.selectTool(toolName)
updateLayerList(toolName, tool)
updateLayerList(toolName, toolHandler.tools[toolName])
end
end

Expand Down

0 comments on commit 78f729f

Please sign in to comment.