Skip to content

Commit

Permalink
Fixed: New created folders didn't show tree panel (Patch on 1.9.5.1)
Browse files Browse the repository at this point in the history
 Correction over commit f028bb2 :
 (Fixed: Tree panel width could be reduced on restart (if it was wide enough))

Ref: #618 (comment)
  • Loading branch information
dpradov committed May 18, 2024
1 parent 95e4c79 commit 5c45ec8
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions general/kn_VCLControlsMng.pas
Original file line number Diff line number Diff line change
Expand Up @@ -427,31 +427,27 @@ procedure CreateVCLControlsForFolder( const aFolder : TKntFolder );
Options := Options + [toFullRowSelect];


if myFolder.VerticalLayout then
Height := myFolder.TreeWidth
else
Width := myFolder.TreeWidth;
{
// When this is checked, the window has not yet been resized to its final size.
// This verification is removed as it seems unnecessary.
// *1 Commented because: when this is checked, the window has not yet been resized to its final size.
// This verification is removed as it seems unnecessary.

if myFolder.VerticalLayout then begin
if (( myFolder.TreeWidth < 30 ) or
( myFolder.TreeWidth > ( Pages.Height - 30 ))) then
if ( myFolder.TreeWidth < 30 )
// or ( myFolder.TreeWidth > ( Pages.Height - 30 ))) // *1
then
Height := ( Pages.Height DIV 3 )
else
Height := myFolder.TreeWidth;
myFolder.TreeWidth := Height; // store corrected value
end
else begin
if (( myFolder.TreeWidth < 30 ) or
( myFolder.TreeWidth > ( Pages.Width - 30 ))) then
if ( myFolder.TreeWidth < 30 )
// or ( myFolder.TreeWidth > ( Pages.Width - 30 ))) // *1
then
Width := ( Pages.Width DIV 3 )
else
Width := myFolder.TreeWidth;
myFolder.TreeWidth := Width; // store corrected value
end;
}

end;

Expand Down

0 comments on commit 5c45ec8

Please sign in to comment.