[nostalgia/core/studio] Add support for TileSheetEditor unsaved changes status
This commit is contained in:
@@ -17,6 +17,7 @@ TileSheetEditorImGui::TileSheetEditorImGui(Context *ctx, const ox::String &path)
|
||||
m_itemPath = path;
|
||||
const auto lastSlash = std::find(m_itemPath.rbegin(), m_itemPath.rend(), '/').offset();
|
||||
m_itemName = m_itemPath.substr(lastSlash + 1);
|
||||
undoStack()->changeTriggered.connect(this, &TileSheetEditorImGui::markUnsavedChanges);
|
||||
}
|
||||
|
||||
ox::String TileSheetEditorImGui::itemName() const noexcept {
|
||||
@@ -142,4 +143,10 @@ void TileSheetEditorImGui::drawPalettePicker() noexcept {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
ox::Error TileSheetEditorImGui::markUnsavedChanges() noexcept {
|
||||
oxDebug("markUnsavedChanges");
|
||||
setUnsavedChanges(true);
|
||||
return OxError(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user