You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.
When multiple tabs are open Sledge will get stuck in an infinite loop because it continually raises Document:Activated events in response to tab change events. An event handler for Document:Activated sets the tab index which raises the tab change event.
I suggest adding a sanity check to the event handler to ignore tab change events if the index hasn't actually changed to stop the infinite loop.
Alternatively, don't change the tab index if the value is identical (this should match what WinForms is doing internally though).
Note that this only appears to be happening when Sledge is opened with multiple tabs to restore. It didn't happen when i initially opened the maps.
The text was updated successfully, but these errors were encountered:
When multiple tabs are open Sledge will get stuck in an infinite loop because it continually raises
Document:Activated
events in response to tab change events. An event handler forDocument:Activated
sets the tab index which raises the tab change event.The documentation for
SelectedIndex
andSelectedIndexChanged
say nothing about raising events if the value is the same, and the source code for the Core port (https://github.com/dotnet/winforms/blob/bced3b69dfb164230f300877a595afc9a000d1a6/src/System.Windows.Forms/src/System/Windows/Forms/TabControl.cs) indicates that it shouldn't, but it is calling into native code for a portion of the logic.I suggest adding a sanity check to the event handler to ignore tab change events if the index hasn't actually changed to stop the infinite loop.
Alternatively, don't change the tab index if the value is identical (this should match what WinForms is doing internally though).
Note that this only appears to be happening when Sledge is opened with multiple tabs to restore. It didn't happen when i initially opened the maps.
The text was updated successfully, but these errors were encountered: