fixed bug in connection tree context menu

right clicking in white space (no connection tree item selected) made the context menu appear with all options enabled. No context menu should appear in that case
This commit is contained in:
David Sparer
2017-11-05 07:24:28 -06:00
parent 7451383c24
commit 85b67ecd0b

View File

@@ -60,9 +60,13 @@ namespace mRemoteNG.UI.Controls
Opening += (sender, args) =>
{
AddExternalApps();
if (_connectionTree.SelectedNode == null)
{
args.Cancel = true;
return;
}
ShowHideMenuItems();
};
Closing += (sender, args) => EnableMenuItemsRecursive(Items);
}
private void InitializeComponent()
@@ -397,9 +401,6 @@ namespace mRemoteNG.UI.Controls
internal void ShowHideMenuItems()
{
if (_connectionTree.SelectedNode == null)
return;
try
{
Enabled = true;