+ for (i = 0; i < WXSIZEOF(customColours); i++)
+ {
+ customColours[i] = colourData.GetCustomColour(i);
+ }
+
+ wxColour curr = colourData.GetColour();
+ if ( curr.Ok() )
+ {
+ bool initColourFound = FALSE;
+
+ for (i = 0; i < WXSIZEOF(wxColourDialogNames); i++)
+ {
+ if ( standardColours[i] == curr && !initColourFound )
+ {
+ whichKind = 1;
+ colourSelection = i;
+ initColourFound = TRUE;
+ break;
+ }
+ }
+ if ( !initColourFound )
+ {
+ for ( i = 0; i < WXSIZEOF(customColours); i++ )
+ {
+ if ( customColours[i] == curr )
+ {
+ whichKind = 2;
+ colourSelection = i;
+ break;
+ }
+ }
+ }
+ singleCustomColour.Set( curr.Red(), curr.Green(), curr.Blue() );
+ }
+ else
+ {
+ whichKind = 1;
+ colourSelection = 0;
+ singleCustomColour.Set( 0, 0, 0 );
+ }