Commit 01382ee3 authored by Karthik Krishnan's avatar Karthik Krishnan
Browse files

BUG: The overlay must be rendered before the color bar + FIx failing test

parent 3063fcf1
......@@ -32,7 +32,7 @@
#include "vtkRenderer.h"
#include "vtkProperty2D.h"
vtkCxxRevisionMacro(vtkScalarBarActor, "1.60");
vtkCxxRevisionMacro(vtkScalarBarActor, "1.61");
vtkStandardNewMacro(vtkScalarBarActor);
vtkCxxSetObjectMacro(vtkScalarBarActor,LookupTable,vtkScalarsToColors);
......@@ -221,6 +221,12 @@ int vtkScalarBarActor::RenderOverlay(vtkViewport *viewport)
int renderedSomething = 0;
int i;
if (this->UseOpacity)
{
this->Texture->Render(vtkRenderer::SafeDownCast(viewport));
renderedSomething += this->TextureActor->RenderOverlay(viewport);
}
// Everything is built, just have to render
if (this->Title != NULL)
{
......@@ -238,12 +244,6 @@ int vtkScalarBarActor::RenderOverlay(vtkViewport *viewport)
renderedSomething += this->TextActors[i]->RenderOverlay(viewport);
}
if (this->UseOpacity)
{
this->Texture->Render(vtkRenderer::SafeDownCast(viewport));
renderedSomething += this->TextureActor->RenderOverlay(viewport);
}
renderedSomething = (renderedSomething > 0)?(1):(0);
return renderedSomething;
......@@ -497,7 +497,7 @@ int vtkScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport)
}
else
{
this->TextActors[i]->SetPosition(barWidth,
this->TextActors[i]->SetPosition(barWidth + 3,
val - sizeTextData[1]/2);
}
}
......
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