fpspreadsheet: More conservative version of previous commit
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9505 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
16e9ab27f1
commit
17132ec44a
@ -1984,14 +1984,15 @@ begin
|
||||
UpdateChart;
|
||||
|
||||
// Another worksheet is selected --> Select the first chart of the worksheet
|
||||
if (lniWorksheet in AChangedItems) and (WorkbookSource <> nil) and (FChart <> nil) then
|
||||
if (lniWorksheet in AChangedItems) and (WorkbookSource <> nil) then
|
||||
begin
|
||||
charts := WorkbookSource.Worksheet.GetCharts;
|
||||
if Length(charts) > 0 then
|
||||
WorkbookChartIndex := WorkbookSource.Workbook.GetChartIndex(charts[0])
|
||||
else
|
||||
WorkbookChartIndex := -1;
|
||||
FChart.Visible := WorkbookChartIndex > -1;
|
||||
if Assigned(FChart) then
|
||||
FChart.Visible := WorkbookChartIndex > -1;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user