448 allow only 1 instance setting does nothing#500
Merged
Hirogen merged 15 commits intoDevelopmentfrom Nov 30, 2025
Merged
Conversation
…s://github.com/LogExperts/LogExpert into 448-allow-only-1-instance-setting-does-nothing
…s://github.com/LogExperts/LogExpert into 448-allow-only-1-instance-setting-does-nothing
…s://github.com/LogExperts/LogExpert into 448-allow-only-1-instance-setting-does-nothing
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 pull request introduces improvements to the "Allow Only One Instance" feature, focusing on better handling of file loading and active window tracking, as well as enhancing test coverage for IPC and window management logic. The changes ensure that when only one instance is allowed, files are loaded into the most recently activated window, and locked windows take priority. Several new unit tests have been added to verify these behaviors and document the intended logic.
Active Window Tracking and File Loading Improvements:
_mostRecentActiveWindowfield inLogExpertProxy. When loading files with "Allow Only One Instance" enabled, files are loaded into this window, falling back to the most recently created window if no activation has occurred. [1] [2]NotifyWindowActivatedmethod is added toILogExpertProxyand implemented inLogExpertProxy, allowing UI code to inform the proxy when a window is activated. This ensures correct window selection for file loading. [1] [2]NotifyWindowActivatedin theOnLogTabWindowActivatedevent, enabling the new tracking mechanism."Allow Only One Instance" and Locked Window Logic:
NewWindowOrLockedWindow, if a locked window exists, it receives the files; otherwise, files are loaded in the most recent active window instead of always creating a new window. This fixes previous issues where new windows were created unnecessarily.Testing Enhancements:
Other Improvements and Maintenance:
ShowErrorMessageAllowOnlyOneInstancesproperty inPreferencesis now marked as[Obsolete]and ignored by JSON serializers, as it is no longer used or saved.