Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion core/base/src/TColor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ namespace {
static Int_t gHighestColorIndex = 0; ///< Highest color index defined
static Float_t gColorThreshold = -1.; ///< Color threshold used by GetColor
static Int_t gDefinedColors = 0; ///< Number of defined colors.
static Int_t gLastDefinedColors = 649; ///< Previous number of defined colors

#define fgGrayscaleMode TColor__GrayScaleMode()
#define fgPalette TColor__Palette()
Expand Down Expand Up @@ -1405,7 +1406,9 @@ Bool_t TColor::DefinedColors()
{
// After initialization gDefinedColors == 649. If it is bigger it means some new
// colors have been defined
return (gDefinedColors-649 > 50);
Bool_t hasChanged = (gDefinedColors - gLastDefinedColors) > 50;
gLastDefinedColors = gDefinedColors;
return hasChanged;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down