mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Fix for Workspace Explorer panel with no workspace
Don't give focus to a non-existent child. Previously any hide/show of the Workspace Explorer without a workspace loaded would crash.
This commit is contained in:
parent
3f68473fe1
commit
83d3ae658d
1 changed files with 3 additions and 2 deletions
|
@ -181,9 +181,10 @@ namespace IDE.ui
|
|||
{
|
||||
base.FocusForKeyboard();
|
||||
SetFocus();
|
||||
if (mListView.GetRoot().FindFocusedItem() == null)
|
||||
let root = mListView.GetRoot();
|
||||
if (root.IsOpen && root.FindFocusedItem() == null)
|
||||
{
|
||||
mListView.GetRoot().GetChildAtIndex(0).Focused = true;
|
||||
root.GetChildAtIndex(0).Focused = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue