Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004073 [JEDI VCL] 00 JVCL Components minor always 2007-02-28 11:31 2007-06-19 08:19
Reporter teejaydub View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.20
Summary 0004073: TJvColorButton doesn't select current color in dialog
Description May only happen when the arrow width is 0 (and so the color dialog pops up directly); haven't tried otherwise.

The Color property isn't copied to the ColorDialog before it's shown, so the dialog comes up with Black selected.

Similarly, the custom color list isn't copied back to the ColorButton when the dialog closes, so it's not updated.

My patch, against (old) version 1.22 of the file (problem still there in Subversion revision 10817):

===================================================================
--- C:/TJW/Dev/Springboard/Reuse/Delphi/JvColorButton.pas (revision 390)
+++ C:/TJW/Dev/Springboard/Reuse/Delphi/JvColorButton.pas (revision 391)
@@ -167,12 +167,15 @@
     {$IFDEF VCL}
     ColorDialog.Options := FOptions;
     {$ENDIF VCL}
- OtherBtn.Caption := FOtherCaption;
- ColorDialog.CustomColors.Assign(FCustomColors);
- if ArrowWidth = 0 then
- begin
- if ColorDialog.Execute then
- FColor := ColorDialog.Color;
+ OtherBtn.Caption := FOtherCaption;
+ ColorDialog.Color := FColor;
+ ColorDialog.CustomColors.Assign(FCustomColors);
+ if ArrowWidth = 0 then
+ begin
+ if ColorDialog.Execute then begin
+ FColor := ColorDialog.Color;
+ FCustomColors.Assign(ColorDialog.CustomColors);
+ end;
         MouseUp(mbLeft, [], X, Y);
       end
     else
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0013456)
obones (administrator)
2007-06-19 08:19

This is now in SVN. Next time, please try to respect our coding style in your patches.

- Issue History
Date Modified Username Field Change
2007-02-28 11:31 teejaydub New Issue
2007-06-19 08:19 obones Status new => resolved
2007-06-19 08:19 obones Fixed in Version => Daily / SVN
2007-06-19 08:19 obones Resolution open => fixed
2007-06-19 08:19 obones Assigned To => obones
2007-06-19 08:19 obones Note Added: 0013456


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker