Commit 6571e2fa authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

Merge branch 'feature/bug_moving_scalarbar' into 'develop'

Feature/bug moving scalarbar

See merge request !44
parents 104424c2 76786bd5
......@@ -214,11 +214,14 @@ vtkRenderWindowInteractor *dtkVisualizationCanvas::interactor(void)
void dtkVisualizationCanvas::addScalarBar(vtkScalarBarActor *scalar_bar)
{
if (this->renderer() && this->renderer()->GetViewProps()->IsItemPresent(scalar_bar)) {
return;
}
++d->nb_scalar_bars;
std::size_t orientation = d->nb_scalar_bars % 2; // 0: horizontal, 1: vertical
std::size_t side = (d->nb_scalar_bars % 4) >= 2; // 0: right, 1: left
std::size_t loop = d->nb_scalar_bars / 4;
std::size_t side = (d->nb_scalar_bars % 4) < 2; // 0: right, 1: left
scalar_bar->SetOrientation(orientation);
......
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