mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 04:52:21 +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();
|
base.FocusForKeyboard();
|
||||||
SetFocus();
|
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