diff --git a/src/components/gameMaster/mapEditor/partials/Toolbar.vue b/src/components/gameMaster/mapEditor/partials/Toolbar.vue index 3965193..f4384da 100644 --- a/src/components/gameMaster/mapEditor/partials/Toolbar.vue +++ b/src/components/gameMaster/mapEditor/partials/Toolbar.vue @@ -117,7 +117,7 @@ const selectPencilOpen = ref(false) const selectEraserOpen = ref(false) const isContinuousDrawingEnabled = ref(false) const isShowPlacedMapObjectPreviewEnabled = ref(mapEditor.isPlacedMapObjectPreviewEnabled.value) -const listOpen = computed(() => mapEditor.tool.value === 'pencil' && (mapEditor.drawMode.value === 'tile' || mapEditor.drawMode.value === 'map_object')) +const listOpen = computed(() => (mapEditor.tool.value === 'pencil' && (mapEditor.drawMode.value === 'tile' || mapEditor.drawMode.value === 'map_object')) || mapEditor.tool.value === 'paint') // drawMode function setDrawMode(value: string) { @@ -148,6 +148,7 @@ function handleModeClick(mode: string, type: 'pencil' | 'eraser') { function handleClick(tool: string) { mapEditor.setTool(tool) + if (tool === 'paint') mapEditor.setDrawMode('tile') selectPencilOpen.value = tool === 'pencil' ? !selectPencilOpen.value : false selectEraserOpen.value = tool === 'eraser' ? !selectEraserOpen.value : false if (mapEditor.drawMode.value === 'teleport') emit('open-teleport')