mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-26 03:58:45 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user