Commit 15e46477 authored by Brian Helba's avatar Brian Helba
Browse files

Make vtkChartHistogram2D tooltip appear on top of legend

Previously, the vtkTooltipItem in a vtkChartHistogram2D would
be painted before the vtkColorLegend, and thus appear behind it.

Ideally, there should be a way to define the order in which
vtkAbstractContextItems at the same level are painted, besides simply
the order in which they are added to the vtkContextScenePrivate.

Change-Id: Idda62c50f3192add1c13e6fcf921303726a37f88
parent 37985d9d
......@@ -24,6 +24,7 @@
#include "vtkAxis.h"
#include "vtkPlotHistogram2D.h"
#include "vtkColorLegend.h"
#include "vtkTooltipItem.h"
#include "vtkSmartPointer.h"
#include "vtkObjectFactory.h"
......@@ -40,6 +41,10 @@ vtkChartHistogram2D::vtkChartHistogram2D()
this->Legend = vtkSmartPointer<vtkColorLegend>::New();
// Re-add tooltip, making it the last ContextItem to be painted
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment