![]() | 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: | Adding a TColorBandTool at design time and viewing the form "as text" duplicates the TColorLineTool over and over | ||
|---|---|---|---|
| Product: | VCL TeeChart | Reporter: | yeray alonso <yeray> |
| Component: | Tools | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | david |
| Priority: | --- | ||
| Version: | 140220 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
Fixed. The problem was at TColorBandTool.ReadState, Start and End lines Axis property was set in a ways that it was adding the lines inside the Chart.Tools list, thus duplicating them every time. Start and End lines are private to ColorBand and should never appear inside Chart1.Tools list, but, internally Start and End lines need a valid ParentChart to paint. Re-fixed. |
At design time: - Drop a TChart into the form. - Add a TLineSeries to the chart. - Add a TColorBandTool to the chart. - Go to "View as Text". You'll see this: object ChartTool1: TColorBandTool ResizeEnd = True ResizeStart = True AxisID = 2 object TColorLineTool Active = False DragRepaint = True AxisID = 2 object TAnnotationTool Shape.Alignment = taCenter Shape.Shadow.Visible = False Shape.TextAlignment = taCenter TextAlignment = taCenter end end object TColorLineTool Active = False DragRepaint = True AxisID = 2 object TAnnotationTool Shape.Alignment = taCenter Shape.Shadow.Visible = False Shape.TextAlignment = taCenter TextAlignment = taCenter end end end Then, if you go to "View as Form" and you open the editor again, now in the tools section you'll see the TColorBandTool and two TColorLineTools?! If you close the editor and you go to "View as Text" again, you'll see another TColorLineTool into both into the TColorBandTool and outside: object ChartTool1: TColorBandTool ResizeEnd = True ResizeStart = True AxisID = 2 object TColorLineTool Active = False DragRepaint = True AxisID = 2 object TAnnotationTool Shape.Alignment = taCenter Shape.Shadow.Visible = False Shape.TextAlignment = taCenter TextAlignment = taCenter end end object TColorLineTool Active = False DragRepaint = True AxisID = 2 object TAnnotationTool Shape.Alignment = taCenter Shape.Shadow.Visible = False Shape.TextAlignment = taCenter TextAlignment = taCenter end end end object TColorLineTool Active = False DragRepaint = True AxisID = 2 object TAnnotationTool Shape.Alignment = taCenter Shape.Shadow.Visible = False Shape.TextAlignment = taCenter TextAlignment = taCenter end end object TColorLineTool Active = False DragRepaint = True AxisID = 2 object TAnnotationTool Shape.Alignment = taCenter Shape.Shadow.Visible = False Shape.TextAlignment = taCenter TextAlignment = taCenter end end end