[nostalgia/core/studio] Fix DrawCommand not to allow appending of duplicates
This commit is contained in:
@@ -19,7 +19,6 @@ void TileSheetEditorModel::draw(const geo::Point &pt, std::size_t palIdx) noexce
|
||||
m_updated = m_ongoingDrawCommand->append(ptToIdx(pt, m_img.columns));
|
||||
} else {
|
||||
pushCommand(new DrawCommand(&m_img, ptToIdx(pt, m_img.columns), palIdx));
|
||||
m_updated = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +69,7 @@ void TileSheetEditorModel::getFillPixels(bool *pixels, const geo::Point &pt, int
|
||||
void TileSheetEditorModel::pushCommand(studio::UndoCommand *cmd) noexcept {
|
||||
m_undoStack.push(cmd);
|
||||
m_ongoingDrawCommand = dynamic_cast<DrawCommand*>(cmd);
|
||||
m_updated = true;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user