![]() | Steema Issues DatabaseNote: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;otherwise you can use StackOverflow. Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy. |
| Summary: | EIndexOutOfRange when loading a chart with series groups (Incl fix) | ||
|---|---|---|---|
| Product: | VCL TeeChart | Reporter: | h.hasenack <hans> |
| Component: | Editors | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | major | CC: | hans, sandra |
| Priority: | High | ||
| Version: | 17.160426 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
There is some code causing an EIndexOutOfrange error. I do not have the code to reproduce the error at hand as it involves quite some steps (by hand). Here is the proposed fix in TeEngine.pas: (********************) Procedure TCustomAxisPanel.Loaded; var t, tt: Integer; {$IFDEF HH_PATCH_TCustomAxisPanel_Loaded} // works around index out of range error idx:integer; {$endif} begin inherited; if SeriesGroups.Count>0 then begin for t:=0 to SeriesGroups.Count-1 do begin with SeriesGroups[t] do begin try if (Assigned(FTempSeries)) and (FTempSeries.Count>0) then begin for tt:=0 to FSeries.Count-1 do FSeries.Delete(tt); for tt:=0 to FTempSeries.Count-1 do {$IFDEF HH_PATCH_TCustomAxisPanel_Loaded} // works around index out of range error begin idx:=StrToInt(FTempSeries[tt]); if InRange(idx,0,SeriesList.Count-1) then FSeries.Add(SeriesList.Items[idx]); end {$else} FSeries.Add(SeriesList.Items[StrToInt(FTempSeries[tt])]); {$endif} end; finally Freeandnil(FTempSeries); end; end; end; end; end;