Steema Issues Database

Note: 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.



Bug 610 - Adding a TColorBandTool at design time and viewing the form "as text" duplicates the TColorLineTool over and over
Summary: Adding a TColorBandTool at design time and viewing the form "as text" duplica...
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Tools (show other bugs)
Version: 140220
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-27 09:41 EST by yeray alonso
Modified: 2014-03-05 13:51 EST (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2014-02-27 09:41:46 EST
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
Comment 1 david berneda 2014-02-28 06:01:29 EST
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.
Comment 2 david berneda 2014-03-05 13:51:19 EST
Re-fixed.