* Skip unecessary call to AdjustAutoSize in Loaded

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@636 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2008-12-15 23:14:45 +00:00
parent 91ac2d856c
commit 59646e67d2

View File

@ -17454,8 +17454,9 @@ begin
// Because of the special recursion and update stopper when creating the window (or resizing it)
// we have to manually trigger the auto size calculation here.
//lcl: Call with Force argument to true since AdjustAutoSize is not called in Loaded
if hoAutoResize in FHeader.FOptions then
FHeader.FColumns.AdjustAutoSize(InvalidColumn);
FHeader.FColumns.AdjustAutoSize(InvalidColumn, True);
// Initialize flat scroll bar library if required.
{$ifdef UseFlatScrollbars}
@ -21756,10 +21757,13 @@ begin
FHeader.UpdateMainColumn;
FHeader.FColumns.FixPositions;
if toAutoBidiColumnOrdering in FOptions.FAutoOptions then
FHeader.FColumns.ReorderColumns(UseRightToLeftAlignment);
FHeader.FColumns.ReorderColumns(UseRightToLeftAlignment);
FHeader.RecalculateHeader;
if hoAutoResize in FHeader.FOptions then
FHeader.FColumns.AdjustAutoSize(InvalidColumn, True);
//lclheader
//AdjustAutoSize is called inside CreateWnd. Don't call here
//Keep the commented code until we get sure of not being necessary
//if hoAutoResize in FHeader.FOptions then
// FHeader.FColumns.AdjustAutoSize(InvalidColumn, True);
finally
Updated;
end;