mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 14:07:46 +08:00
Add debug logging for edge case in tab navigation
Co-authored-by: Kvarkas <3611964+Kvarkas@users.noreply.github.com>
This commit is contained in:
@@ -366,7 +366,12 @@ namespace mRemoteNG.UI.Window
|
||||
if (documents.Length <= 1) return;
|
||||
|
||||
var currentIndex = Array.IndexOf(documents, connDock.ActiveContent);
|
||||
if (currentIndex == -1) return;
|
||||
if (currentIndex == -1)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg,
|
||||
"NavigateToNextTab: ActiveContent not found in documents array");
|
||||
return;
|
||||
}
|
||||
|
||||
var nextIndex = (currentIndex + 1) % documents.Length;
|
||||
documents[nextIndex].DockHandler.Activate();
|
||||
@@ -385,7 +390,12 @@ namespace mRemoteNG.UI.Window
|
||||
if (documents.Length <= 1) return;
|
||||
|
||||
var currentIndex = Array.IndexOf(documents, connDock.ActiveContent);
|
||||
if (currentIndex == -1) return;
|
||||
if (currentIndex == -1)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg,
|
||||
"NavigateToPreviousTab: ActiveContent not found in documents array");
|
||||
return;
|
||||
}
|
||||
|
||||
var previousIndex = currentIndex - 1;
|
||||
if (previousIndex < 0)
|
||||
|
||||
Reference in New Issue
Block a user