Browse Source

Disable the New drop down menu, when session is disconnected

Source commit: 0646bb65e5f9d59019e61be37c15d7e97349b8da
Martin Prikryl 6 years ago
parent
commit
3909dc9d91
1 changed files with 4 additions and 0 deletions
  1. 4 0
      source/forms/ScpCommander.cpp

+ 4 - 0
source/forms/ScpCommander.cpp

@@ -893,6 +893,10 @@ void __fastcall TScpCommanderForm::UpdateControls()
 
   CommandLineCombo->Enabled = IsSideLocalBrowser(FCurrentSide) || CanConsole();
   CommandLinePromptLabel->Enabled = CommandLineCombo->Enabled;
+
+  // Ad hoc hack to disable the drop down menu, when all its items (and all other buttons on the toolbar) are disabled,
+  // otherwise it shines too much on the toolbar.
+  RemoteNewSubmenuItem->Enabled = DirViewEnabled(osRemote);
 }
 //---------------------------------------------------------------------------
 void __fastcall TScpCommanderForm::ChangePath(TOperationSide Side)