Skip to content

Commit 78f729f

Browse files
committed
Fixed material list not updating in room tool
updateLayerList now sends the actual tool along instead of undefined variable
1 parent ea87491 commit 78f729f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ui/windows/tools.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,10 @@ local function updateLayerList(toolName, tool)
434434

435435
else
436436
toolWindow.layerPanel:removeSelf()
437+
438+
-- Always update material list if the layer list is invisible
439+
-- Layer item callback will never happen and the material list will be stuck
440+
toolWindow.materialList:updateItems(getMaterialItems("fake_layer_name"))
437441
end
438442

439443
toolWindow.layerPanelVisible = newVisible
@@ -553,7 +557,7 @@ local function toolCallback(list, toolName)
553557
toolWindow.eventStates.material = nil
554558

555559
toolHandler.selectTool(toolName)
556-
updateLayerList(toolName, tool)
560+
updateLayerList(toolName, toolHandler.tools[toolName])
557561
end
558562
end
559563

0 commit comments

Comments
 (0)