Skip to content
Merged
Changes from 1 commit
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
Next Next commit
Added resetting flag to ensure that each Jupyter cell is independent …
…of the others when deciding whether to include the list of TColors
  • Loading branch information
hshe824 committed Aug 17, 2017
commit 135f5c9a8d4dc79ce5a2c7d368e52b6e601c8e01
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 = 0; ///< 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