fpspreadsheet: Fix worksheetgrid initially selecting cell B1 if attached to the internal workbook source

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5738 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2017-02-03 12:09:21 +00:00
parent f481479e3f
commit 07f9fa03df

View File

@ -82,6 +82,7 @@ type
FDefColWidth100: Integer; // Default col width for 100% zoom factor, in pixels
FZoomLock: Integer;
FRowHeightLock: Integer;
FActiveCellLock: Integer;
FOnClickHyperlink: TsHyperlinkClickEvent;
function CalcAutoRowHeight(ARow: Integer): Integer;
function CalcColWidthFromSheet(AWidth: Single): Integer;
@ -1017,7 +1018,9 @@ begin
FInternalWorkbookSource := TsWorkbookSource.Create(self);
FInternalWorkbookSource.Name := 'internal';
inc(FActiveCellLock);
inherited Create(AOwner);
dec(FActiveCellLock);
AutoAdvance := aaDown;
ExtendedSelect := true;
@ -4378,6 +4381,9 @@ var
i: Integer;
{$ENDIF}
begin
if (FActiveCellLock > 0) then
exit;
if Worksheet <> nil then
begin
{$IFNDEF FPS_NO_GRID_MULTISELECT}