[nostalgia/core/studio] Fix some use after move bugs
This commit is contained in:
parent
d22c968561
commit
4a94672fdc
@ -8,11 +8,11 @@ namespace nostalgia::core {
|
||||
|
||||
core::RmSubSheetCommand::RmSubSheetCommand(TileSheet &img, TileSheet::SubSheetIdx idx) noexcept:
|
||||
m_img(img),
|
||||
m_idx(std::move(idx)) {
|
||||
m_parentIdx = idx;
|
||||
m_idx(std::move(idx)),
|
||||
m_parentIdx(m_idx) {
|
||||
m_parentIdx.pop_back();
|
||||
auto &parent = m_img.getSubSheet(m_parentIdx);
|
||||
m_sheet = parent.subsheets[*idx.back().value];
|
||||
m_sheet = parent.subsheets[*m_idx.back().value];
|
||||
}
|
||||
|
||||
void RmSubSheetCommand::redo() noexcept {
|
||||
|
Loading…
Reference in New Issue
Block a user