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 880

Summary: Custom ColorGrid Palette resets
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: SeriesAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: 140220   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: http://www.teechart.net/support/viewtopic.php?f=3&t=15121&p=67092#p67092
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: Custom ColorGrid palette lost

Description yeray alonso 2014-08-11 09:14:39 EDT
Created attachment 259 [details]
Custom ColorGrid palette lost

TeeSurfa.pas rev 1.36 (TeeChart v2014.10) introduced property IDirtyPalette that seems to break the palette the user defines in the example attached.

Here it is a possible fix, adding an "if" to TCustom3DPaletteSeries.NotifyValue

Procedure TCustom3DPaletteSeries.NotifyValue(ValueEvent:TValueEvent; ValueIndex:Integer);
begin
  inherited;
  if ValueEvent=veClear then
    IDirtyPalette:=True;
end;
Comment 1 yeray alonso 2014-08-11 09:31:47 EDT
A better fix would probably be in TCustom3DPaletteSeries.CheckPaletteEmpty, changing this:

Procedure TCustom3DPaletteSeries.CheckPaletteEmpty;
begin
  if (Count>0) and ( (Length(FPalette)=0) or IDirtyPalette ) then
     CreateDefaultPalette;
end;

For this:

Procedure TCustom3DPaletteSeries.CheckPaletteEmpty;
begin
  if (Count>0) and ( (Length(FPalette)=0) or not IDirtyPalette ) then
     CreateDefaultPalette;
end;