From 10da44e341c9922d1cbe2af7b0a5fac96feb5c4e Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 17 Sep 2020 06:11:39 -0700 Subject: [PATCH] Fixed keyboard focus when navigating workspace files --- IDE/src/IDEApp.bf | 2 +- IDE/src/ui/SourceViewPanel.bf | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/IDE/src/IDEApp.bf b/IDE/src/IDEApp.bf index 0d91038d..a6033d42 100644 --- a/IDE/src/IDEApp.bf +++ b/IDE/src/IDEApp.bf @@ -6427,7 +6427,7 @@ namespace IDE if (tabButton.mIsActive) { // If this succeeds then tabbUtton.mIsActive will be false, otherwise we do the 'nextTab' logic below - ShowRecentFile(0); + ShowRecentFile(0, hasFocus); } TabbedView.TabButton nextTab = null; diff --git a/IDE/src/ui/SourceViewPanel.bf b/IDE/src/ui/SourceViewPanel.bf index dcefd854..2639b605 100644 --- a/IDE/src/ui/SourceViewPanel.bf +++ b/IDE/src/ui/SourceViewPanel.bf @@ -120,8 +120,15 @@ namespace IDE.ui protected override bool WantsUnfocus() { - if ((mWidgetWindow != null) && (mWidgetWindow.mOverWidget is PanelSplitter)) - return false; + if (mWidgetWindow != null) + { + if (mWidgetWindow.mOverWidget is PanelSplitter) + return false; + if (mWidgetWindow.mOverWidget is TabbedView.TabButton) + return false; + if (mWidgetWindow.mOverWidget is DarkTabbedView.DarkTabButtonClose) + return false; + } return base.WantsUnfocus(); }