FPSpreadsheet: Fix duplicate legend items (after tabcontrol support)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9476 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
6599aeba51
commit
d3516c739b
@ -19,7 +19,9 @@ interface
|
||||
|
||||
{$ifdef FPS_CHARTS}
|
||||
|
||||
uses lazloggerbase,
|
||||
uses
|
||||
lazloggerbase,
|
||||
|
||||
// RTL/FCL
|
||||
Classes, Contnrs, SysUtils, Types, FPCanvas,
|
||||
// LCL
|
||||
@ -1976,10 +1978,7 @@ begin
|
||||
|
||||
// Workbook has been successfully loaded, all sheets are ready
|
||||
if (lniWorkbook in AChangedItems) then
|
||||
begin
|
||||
ClearChart;
|
||||
UpdateChart;
|
||||
end;
|
||||
|
||||
// Another worksheet is selected --> Select the first chart of the worksheet
|
||||
if (lniWorksheet in AChangedItems) and (WorkbookSource <> nil) then
|
||||
@ -1989,8 +1988,6 @@ begin
|
||||
WorkbookChartIndex := WorkbookSource.Workbook.GetChartIndex(charts[0])
|
||||
else
|
||||
WorkbookChartIndex := -1;
|
||||
ClearChart;
|
||||
UpdateChart;
|
||||
FChart.Visible := WorkbookChartIndex > -1;
|
||||
end;
|
||||
end;
|
||||
@ -2128,13 +2125,11 @@ var
|
||||
ch: TsChart;
|
||||
i: Integer;
|
||||
begin
|
||||
if (FChart = nil) then
|
||||
ClearChart;
|
||||
|
||||
if (FChart = nil) or (FWorkbookSource = nil) or (FWorkbookChartIndex < 0) then
|
||||
exit;
|
||||
if (FWorkbookSource = nil) or (FWorkbookChartIndex < 0) then
|
||||
begin
|
||||
ClearChart;
|
||||
exit;
|
||||
end;
|
||||
|
||||
FChart.Proportional := false;
|
||||
FChart.ExpandPercentage := 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user