1
0
Эх сурвалжийг харах

Bug 1829: Failure when changing directory using tree after resuming system from sleep (3rd)

https://winscp.net/tracker/1829

Source commit: 8a5f9be0d7686f5d8acc3e165d71d41fda66b22a
Martin Prikryl 5 жил өмнө
parent
commit
a207c476c3

+ 7 - 0
source/components/UnixDriveView.cpp

@@ -74,6 +74,13 @@ void __fastcall TCustomUnixDriveView::CreateWnd()
   FPrevSelected = Selected;
 }
 //---------------------------------------------------------------------------
+void __fastcall TCustomUnixDriveView::DestroyWnd()
+{
+  // in case we are recreating (TCustomTreeView.DestroyWnd deletes items)
+  FPrevSelected = NULL;
+  TCustomDriveView::DestroyWnd();
+}
+//---------------------------------------------------------------------------
 void __fastcall TCustomUnixDriveView::SetTerminal(TTerminal * value)
 {
   #ifndef DESIGN_ONLY

+ 1 - 0
source/components/UnixDriveView.h

@@ -31,6 +31,7 @@ protected:
   DYNAMIC void __fastcall Delete(TTreeNode * Node);
   DYNAMIC void __fastcall Change(TTreeNode * Node);
   virtual void __fastcall CreateWnd();
+  virtual void __fastcall DestroyWnd();
 
   void __fastcall LoadDirectory();
   TTreeNode * __fastcall LoadPath(UnicodeString Path);