[nostalgia/core/studio] Fix AddSubsheetCommand::undo to undo ID idx change
This commit is contained in:
parent
fb5d3545fe
commit
f34704d845
@ -46,9 +46,11 @@ ox::Error AddSubSheetCommand::undo() noexcept {
|
|||||||
parent.columns = s.columns;
|
parent.columns = s.columns;
|
||||||
parent.pixels = std::move(s.pixels);
|
parent.pixels = std::move(s.pixels);
|
||||||
parent.subsheets.clear();
|
parent.subsheets.clear();
|
||||||
|
--m_img.idIt;
|
||||||
} else {
|
} else {
|
||||||
for (auto idx = m_addedSheets.rbegin(); idx != m_addedSheets.rend(); ++idx) {
|
for (auto idx = m_addedSheets.rbegin(); idx != m_addedSheets.rend(); ++idx) {
|
||||||
oxReturnError(rmSubSheet(m_img, *idx));
|
oxReturnError(rmSubSheet(m_img, *idx));
|
||||||
|
--m_img.idIt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user