Skip to content

Commit 14756b0

Browse files
projects with no known installations will open installation selection dropdown and ENTER will open the proejct right away
1 parent 6606a3e commit 14756b0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

UnityHubNative.Net/UnityProjectView.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,27 @@ private void OnPathLinkClicked()
6767
OsUtils.OpenExplorer(unityProject.path);
6868
}
6969

70-
public void OpenProject()
70+
public async void OpenProject()
7171
{
7272
if (unityProject is null)
7373
return;
7474
if (!unityProject.unity.HasValue)
7575
{
7676
_unityVersionComboBox.Focus();
7777
_unityVersionComboBox.IsDropDownOpen = true;
78+
_unityVersionComboBox.DropDownClosed += DropDownClosed;
7879
return;
7980
}
8081
unityProject.OpenProject();
82+
83+
void DropDownClosed(object? sender, EventArgs e)
84+
{
85+
_unityVersionComboBox.DropDownClosed -= DropDownClosed;
86+
OpenProject();
87+
}
8188
}
8289

90+
8391
public override string ToString() => unityProject?.name ?? string.Empty;
8492

8593
public void Update(UnityProject unityProject)

0 commit comments

Comments
 (0)