diff --git a/deps/nostalgia/src/nostalgia/modules/core/src/studio/tilesheeteditor/commands/addsubsheetcommand.cpp b/deps/nostalgia/src/nostalgia/modules/core/src/studio/tilesheeteditor/commands/addsubsheetcommand.cpp index a822cc7..8aa99f1 100644 --- a/deps/nostalgia/src/nostalgia/modules/core/src/studio/tilesheeteditor/commands/addsubsheetcommand.cpp +++ b/deps/nostalgia/src/nostalgia/modules/core/src/studio/tilesheeteditor/commands/addsubsheetcommand.cpp @@ -46,9 +46,11 @@ ox::Error AddSubSheetCommand::undo() noexcept { parent.columns = s.columns; parent.pixels = std::move(s.pixels); parent.subsheets.clear(); + --m_img.idIt; } else { for (auto idx = m_addedSheets.rbegin(); idx != m_addedSheets.rend(); ++idx) { oxReturnError(rmSubSheet(m_img, *idx)); + --m_img.idIt; } } return {};