mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 13:35:31 +02:00
fix for crash when tabbing with no selected item
This commit is contained in:
@@ -165,7 +165,8 @@ namespace Wox.ViewModel
|
|||||||
|
|
||||||
public void SelectNextTabItem()
|
public void SelectNextTabItem()
|
||||||
{
|
{
|
||||||
if(!SelectedItem.SelectNextContextButton())
|
//Do nothing if there is no selected item or we've selected the next context button
|
||||||
|
if(!SelectedItem?.SelectNextContextButton() ?? true)
|
||||||
{
|
{
|
||||||
SelectNextResult();
|
SelectNextResult();
|
||||||
}
|
}
|
||||||
@@ -173,7 +174,8 @@ namespace Wox.ViewModel
|
|||||||
|
|
||||||
public void SelectPrevTabItem()
|
public void SelectPrevTabItem()
|
||||||
{
|
{
|
||||||
if (!SelectedItem.SelectPrevContextButton())
|
//Do nothing if there is no selected item or we've selected the previous context button
|
||||||
|
if (!SelectedItem?.SelectPrevContextButton() ?? true)
|
||||||
{
|
{
|
||||||
//Tabbing backwards should highlight the last item of the previous row
|
//Tabbing backwards should highlight the last item of the previous row
|
||||||
SelectPrevResult();
|
SelectPrevResult();
|
||||||
|
|||||||
Reference in New Issue
Block a user