Browse Source

Issue 2276 – File panel does not have focus after Login in Explorer interface

https://winscp.net/tracker/2276

Source commit: d0f08d51d2cda0976046ee08d7349afeadbbdec2
Martin Prikryl 1 year ago
parent
commit
7672a8d25b
2 changed files with 11 additions and 0 deletions
  1. 10 0
      source/forms/ScpExplorer.cpp
  2. 1 0
      source/forms/ScpExplorer.h

+ 10 - 0
source/forms/ScpExplorer.cpp

@@ -434,3 +434,13 @@ void TScpExplorerForm::ResetLayoutColumns(TOperationSide)
 {
   RemoteDirView->UnixColProperties->ParamsStr = ScpExplorerDirViewParamsDefault;
 }
+//---------------------------------------------------------------------------
+void __fastcall TScpExplorerForm::UpdateControls()
+{
+  TCustomScpExplorerForm::UpdateControls();
+
+  if ((ActiveControl == NULL) && RemoteDirView->CanFocus())
+  {
+    ActiveControl = RemoteDirView;
+  }
+}

+ 1 - 0
source/forms/ScpExplorer.h

@@ -373,6 +373,7 @@ protected:
   virtual void __fastcall ToolbarItemResize(TTBXCustomDropDownItem * Item, int Width);
   virtual bool __fastcall UpdateToolbarDisplayMode();
   virtual void __fastcall UpdateImages();
+  virtual void __fastcall UpdateControls();
 
 public:
   __fastcall TScpExplorerForm(TComponent* Owner);