From cb25e610bb041d2e2e02d5225aa52a085139eee9 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 29 May 2025 22:12:10 -0500 Subject: [PATCH] [nostalgia/gfx/studio/tilesheet] Fix manual redo of draw actions, fix drawing to pixel 0, 0 as first action --- .../gfx/src/studio/tilesheeteditor/tilesheeteditormodel.cpp | 1 + .../gfx/src/studio/tilesheeteditor/tilesheeteditormodel.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditormodel.cpp b/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditormodel.cpp index 18b29553..5f4f99ad 100644 --- a/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditormodel.cpp +++ b/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditormodel.cpp @@ -198,6 +198,7 @@ void TileSheetEditorModel::endDrawCommand() noexcept { if (m_ongoingDrawCommand) { m_ongoingDrawCommand->finish(); m_ongoingDrawCommand = nullptr; + m_lastDrawUpdatePt = {-1, -1}; } } diff --git a/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditormodel.hpp b/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditormodel.hpp index 46633065..4f6945da 100644 --- a/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditormodel.hpp +++ b/src/nostalgia/modules/gfx/src/studio/tilesheeteditor/tilesheeteditormodel.hpp @@ -35,7 +35,7 @@ class TileSheetEditorModel: public ox::SignalHandler { studio::SelectionTracker m_selTracker; ox::Optional m_selection; ox::Point m_lineStartPt; - ox::Point m_lastDrawUpdatePt; + ox::Point m_lastDrawUpdatePt{-1, -1}; bool m_updated = false; public: