[nostalgia/core/studio] Fix AddSubsheetCommand::undo to undo ID idx change

This commit is contained in:
Gary Talent 2024-05-31 23:59:15 -05:00
parent fb5d3545fe
commit f34704d845

View File

@ -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 {};