mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 12:46:47 +02:00
Codeflow cleanup when selectedItem is not null
This commit is contained in:
@@ -155,11 +155,11 @@ namespace Wox.ViewModel
|
|||||||
if(results.SelectedItem != null)
|
if(results.SelectedItem != null)
|
||||||
{
|
{
|
||||||
//If there is a context button selected fire the action for that button before the main command.
|
//If there is a context button selected fire the action for that button before the main command.
|
||||||
bool didExecuteContextButton = results.SelectedItem?.ExecuteSelectedContextButton() ?? false;
|
bool didExecuteContextButton = results.SelectedItem.ExecuteSelectedContextButton();
|
||||||
|
|
||||||
if (!didExecuteContextButton)
|
if (!didExecuteContextButton)
|
||||||
{
|
{
|
||||||
var result = results.SelectedItem?.Result;
|
var result = results.SelectedItem.Result;
|
||||||
if (result != null) // SelectedItem returns null if selection is empty.
|
if (result != null) // SelectedItem returns null if selection is empty.
|
||||||
{
|
{
|
||||||
bool hideWindow = result.Action != null && result.Action(new ActionContext
|
bool hideWindow = result.Action != null && result.Action(new ActionContext
|
||||||
|
|||||||
Reference in New Issue
Block a user