From fae3c6566cd87e0b5fcf788deab742b781876c4a Mon Sep 17 00:00:00 2001 From: Gaspar Capello Date: Fri, 17 Feb 2023 17:55:58 -0300 Subject: [PATCH] Fix don't create new tiles on tilemap layer in an empty cel with hasTileManagementPlugin. --- src/app/ui/editor/standby_state.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/ui/editor/standby_state.cpp b/src/app/ui/editor/standby_state.cpp index fbce4fb5c..f09e936ac 100644 --- a/src/app/ui/editor/standby_state.cpp +++ b/src/app/ui/editor/standby_state.cpp @@ -642,6 +642,11 @@ DrawingState* StandbyState::startDrawingState( const DrawingType drawingType, const tools::Pointer& pointer) { + if (editor->layer()->isTilemap() && + editor->sprite()->hasTileManagementPlugin() && + !editor->layer()->cel(editor->frame())) { + return nullptr; + } // We need to clear and redraw the brush boundaries after the // first mouse pressed/point shape if drawn. This is to avoid // graphical glitches (invalid areas in the ToolLoop's src/dst