[nostalgia/studio] Fix TileSheetEditor to switch to appropriate subsheet on undo/redo

This commit is contained in:
2022-05-18 21:15:11 -05:00
parent 71f6364ea3
commit 6854e658a0
12 changed files with 158 additions and 52 deletions

View File

@@ -150,7 +150,7 @@ void TileSheetEditorImGui::draw(core::Context*) noexcept {
m_subsheetEditor.draw();
}
void TileSheetEditorImGui::drawSubsheetSelector(TileSheet::SubSheet *subsheet, TileSheet::SubSheetIdx *path) noexcept {
void TileSheetEditorImGui::drawSubsheetSelector(TileSheet::SubSheet *subsheet, TileSheet::SubSheetIdx *path) {
ImGui::TableNextRow(0, 5);
using Str = ox::BasicString<100>;
auto pathStr = ox::join<Str>("##", *path).value;
@@ -305,7 +305,7 @@ ox::Error TileSheetEditorImGui::updateActiveSubsheet(const ox::String &name, int
return model()->updateSubsheet(model()->activeSubSheetIdx(), name, cols, rows);
}
ox::Error TileSheetEditorImGui::markUnsavedChanges(int) noexcept {
ox::Error TileSheetEditorImGui::markUnsavedChanges(const studio::UndoCommand*) noexcept {
setUnsavedChanges(true);
return OxError(0);
}