Open documents in one of three ways instead of two bools, and let dialogs know when they take many files

DocumentOpen (open, new, or restored from an autosave) replaces isNew and isRecent and Manager::new_.
The *_OPEN dialogs pick several files without being told.
This commit is contained in:
shweet committed 2026-11-22 18:56:16 -05:00
1 parent 1fc6b064ae
commit 228a15b5b3
13 files changed
+36 -31

No files matched your search

+2 -1
View File
@@ -186,8 +186,9 @@ static void frame_time_sync(Document& document)
document.frameTime = item && frameIndex >= 0 ? frame_time_from_index_get(*item, frameIndex) : 0.0f;
}
Document::Document(const std::filesystem::path& path, bool isNew, std::string* errorString)
Document::Document(const std::filesystem::path& path, DocumentOpen mode, std::string* errorString)
{
auto isNew = mode == DOCUMENT_NEW;
tabId = document_tab_id_next();
model = model_make();
if (!isNew)