Repository navigation
Introduce Single Instance per File Mechanism - #44
Merged
shun-iwasawa merged 1 commit intoJul 15, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR ensures that only one window is opened per XDTS file, even if XDTS Viewer is launched multiple times for the same file.
This prevents conflicting edits from multiple windows on the same file.
Additionally, if an XDTS file is modified externally and XDTS Viewer is relaunched with that file's path, the existing window's timing data is reloaded and refreshed, while any unsaved hand-drawn (scribble) edits are preserved.
On first launch, an invisible "mothership" process starts (detected via a QSharedMemory lock) and coordinates per-file "worker" windows, each running as its own child process, over IPC (QLocalServer/QLocalSocket). This coordination is implemented in the newly added
InstanceManagerclass.When XDTS Viewer is launched with a path that's already open in an existing window — including either file of a paired genga/douga sheet — the mothership asks that window to reload its data and brings it to the foreground instead of opening a new one.
The mothership process exits automatically once all windows have been closed.