Browse Source

Bug 2025: Panels are drawn incorrectly after toggling Full row select

https://winscp.net/tracker/2025
(cherry picked from commit 79579f585bb7876d6f4e330f72da0e764f3b5b64)

# Conflicts:
#	source/forms/CustomScpExplorer.cpp

Source commit: d0ed8f493a8bb6c083a5a08cbb38997b426407a1
Martin Prikryl 4 years ago
parent
commit
5df66378ed
2 changed files with 4 additions and 4 deletions
  1. 2 2
      source/forms/CustomScpExplorer.cpp
  2. 2 2
      source/forms/ScpCommander.cpp

+ 2 - 2
source/forms/CustomScpExplorer.cpp

@@ -1029,8 +1029,8 @@ void __fastcall TCustomScpExplorerForm::ConfigurationChanged()
   if (RemoteDirView->RowSelect != WinConfiguration->FullRowSelect)
   {
     RemoteDirView->RowSelect = WinConfiguration->FullRowSelect;
-    // selection is not redrawn automatically when RowSelect changes
-    RemoteDirView->Invalidate();
+    // Without this, the panel turns gray and unused part of header turns black
+    RemoteDirView->Perform(CM_COLORCHANGED, 0, 0);
   }
 
   RemoteDriveView->DDAllowMove = !WinConfiguration->DDDisableMove;

+ 2 - 2
source/forms/ScpCommander.cpp

@@ -655,8 +655,8 @@ void __fastcall TScpCommanderForm::ConfigurationChanged()
   if (LocalDirView->RowSelect != WinConfiguration->FullRowSelect)
   {
     LocalDirView->RowSelect = WinConfiguration->FullRowSelect;
-    // selection is not redrawn automatically when RowSelect changes
-    LocalDirView->Invalidate();
+    // Without this, the panel turns gray and unused part of header turns black
+    LocalDirView->Perform(CM_COLORCHANGED, 0, 0);
   }
 
   // See also LocalDirViewDDTargetHasDropHandler