forked from 1b-agent/opencadstudio-upstream
plugin: announce DocumentOpened once per load, not per tab switch
The guard remembered only the last announced (tab, generation), so switching A -> B -> A announced A's load again. Each tab now carries its own pending flag, set when a document is installed and cleared by the boundary dispatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
68330ce39e
commit
4d66a58374
7 files changed
+28
-51
No files matched your search
@@ -2276,9 +2276,9 @@ impl OpenCADStudio {
|
||||
.set(crate::app::OPEN_PHASE_FINALIZING, 10000, 1, 1);
|
||||
}
|
||||
self.opening.take();
|
||||
// The document and its derived caches have settled: mark the tab's
|
||||
// generation so the next message boundary announces `DocumentOpened`
|
||||
// to native plugins exactly once for this load (API v9).
|
||||
// The document and its derived caches have settled: the next message
|
||||
// boundary announces `DocumentOpened` to native plugins exactly once
|
||||
// for this load (API v9).
|
||||
self.tabs[i].note_document_loaded();
|
||||
// The tab list just changed (and the active tab with it): remember
|
||||
// it for the next boot's restore flow (web session memory).
|
||||
|
||||
Reference in new issue
Block a user