Store the cmapindex and use it to select the correct gradien in the adjust window

This commit is contained in:
ronaldhordijk
2005-09-25 08:10:09 +00:00
parent 3c5e316960
commit ea11c313df
9 changed files with 53 additions and 42 deletions

View File

@ -281,6 +281,7 @@ type
procedure WritePreset(n: integer);
function PresetToStr(n: integer): string;
procedure UpdateGradient(Pal: TColorMap);
// --
public
PreviewDensity: double;
@ -291,7 +292,6 @@ type
procedure UpdateDisplay;
procedure UpdateFlame;
procedure UpdateGradient(Pal: TColorMap);
end;
var
@ -364,7 +364,12 @@ begin
Resetting := False;
DrawPreview;
Palette:=cp.cmap;
// gradient
if cp.cmapindex >= 0 then
cmbPalette.ItemIndex := cp.cmapindex;
ScrollBar.Position := 0;
Palette := cp.cmap;
BackupPal := cp.cmap;
DrawPalette;
end;