[nostalgia/core/studio] Fix Add SubSheet to increment idIt before using it
Some checks failed
Build / build (push) Failing after 23s
Some checks failed
Build / build (push) Failing after 23s
This commit is contained in:
parent
79bdbf2eaa
commit
087c834b25
@ -28,12 +28,12 @@ void AddSubSheetCommand::redo() noexcept {
|
|||||||
auto &parent = m_img.getSubSheet(m_parentIdx);
|
auto &parent = m_img.getSubSheet(m_parentIdx);
|
||||||
if (m_addedSheets.size() < 2) {
|
if (m_addedSheets.size() < 2) {
|
||||||
auto i = parent.subsheets.size();
|
auto i = parent.subsheets.size();
|
||||||
parent.subsheets.emplace_back(m_img.idIt++, ox::sfmt("Subsheet {}", i), 1, 1, m_img.bpp);
|
parent.subsheets.emplace_back(++m_img.idIt, ox::sfmt("Subsheet {}", i), 1, 1, m_img.bpp);
|
||||||
} else {
|
} else {
|
||||||
parent.subsheets.emplace_back(m_img.idIt++, "Subsheet 0", parent.columns, parent.rows, std::move(parent.pixels));
|
parent.subsheets.emplace_back(++m_img.idIt, "Subsheet 0", parent.columns, parent.rows, std::move(parent.pixels));
|
||||||
parent.rows = 0;
|
parent.rows = 0;
|
||||||
parent.columns = 0;
|
parent.columns = 0;
|
||||||
parent.subsheets.emplace_back(m_img.idIt++, "Subsheet 1", 1, 1, m_img.bpp);
|
parent.subsheets.emplace_back(++m_img.idIt, "Subsheet 1", 1, 1, m_img.bpp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user