Selaa lähdekoodia

Bug fix: When switching from remote to local tab, other panel drive drop down menu is not updated

Caused by e6396a0e

Source commit: a4f34003bba0747b27aafa2b1b364595dc8ca777
Martin Prikryl 3 kuukautta sitten
vanhempi
sitoutus
157fbfdeb0
2 muutettua tiedostoa jossa 8 lisäystä ja 2 poistoa
  1. 7 2
      source/forms/ScpCommander.cpp
  2. 1 0
      source/forms/ScpCommander.h

+ 7 - 2
source/forms/ScpCommander.cpp

@@ -725,7 +725,7 @@ void __fastcall TScpCommanderForm::SessionChanged(bool Replaced)
       // Particularly, when switching from a remote to a local-local session,
       // the other local dir view path may not change at all,
       // so the path combo box would retain the remote path.
-      UpdateRemotePathComboBox(false);
+      OtherLocalPathComboUpdateDrives();
     }
   }
 }
@@ -2266,13 +2266,18 @@ void TScpCommanderForm::LocalPathComboUpdateDrives(
   LocalPathComboUpdate(ADirView, ALocalPathComboBox, LocalPathComboBoxPaths);
 }
 //---------------------------------------------------------------------------
+void TScpCommanderForm::OtherLocalPathComboUpdateDrives()
+{
+  LocalPathComboUpdateDrives(RemotePathComboBox, OtherLocalDirView, OtherLocalDriveView, FOtherLocalPathComboBoxPaths);
+}
+//---------------------------------------------------------------------------
 void __fastcall TScpCommanderForm::LocalPathComboUpdateDrives()
 {
   LocalPathComboUpdateDrives(LocalPathComboBox, LocalDirView, LocalDriveView, FLocalPathComboBoxPaths);
 
   if (IsLocalBrowserMode())
   {
-    LocalPathComboUpdateDrives(RemotePathComboBox, OtherLocalDirView, OtherLocalDriveView, FOtherLocalPathComboBoxPaths);
+    OtherLocalPathComboUpdateDrives();
   }
 }
 //---------------------------------------------------------------------------

+ 1 - 0
source/forms/ScpCommander.h

@@ -648,6 +648,7 @@ protected:
   void __fastcall CreateRemoteDirectory(const UnicodeString & Path);
   void LocalPathComboUpdateDrives(
     TTBXComboBoxItem * ALocalPathComboBox, TCustomDirView * ADirView, TDriveView * ALocalDriveView, TStrings * LocalPathComboBoxPaths);
+  void OtherLocalPathComboUpdateDrives();
   void __fastcall LocalPathComboUpdateDrives();
   void LocalPathComboUpdate(TCustomDirView * ADirView, TTBXComboBoxItem * PathComboBox, TStrings * LocalPathComboBoxPaths);
   virtual void __fastcall ToolbarItemResize(TTBXCustomDropDownItem * Item, int Width);