Commit 93ae6ec9 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

fix axes touch method

parent 7aad66c4
......@@ -175,10 +175,10 @@ void dtkVisualizationDecoratorAxes::setCanvas(dtkVisualizationCanvas *canvas)
d->cube_axes_actor->SetCamera(d->view->renderer()->GetActiveCamera());
if(!d->dataset){
d->cube_axes_actor->SetBounds(d->view->renderer()->ComputeVisiblePropBounds());
if(!d->dataset) {
d->cube_axes_actor->SetBounds(d->view->renderer()->ComputeVisiblePropBounds());
} else {
d->cube_axes_actor->SetBounds(d->dataset->GetBounds());
d->cube_axes_actor->SetBounds(d->dataset->GetBounds());
}
}
......@@ -186,6 +186,9 @@ void dtkVisualizationDecoratorAxes::unsetCanvas(void)
{
if (d->view) {
d->view->renderer()->RemoveActor(d->cube_axes_actor);
d->marker->SetEnabled(false);
d->marker->SetInteractor(nullptr);
}
d->view = nullptr;
......@@ -212,6 +215,7 @@ void dtkVisualizationDecoratorAxes::touch(void)
dtkWarn() << Q_FUNC_INFO << "No canvas was set, call setCanvas to call draw on a canvas.";
return;
}
d->cube_axes_actor->SetBounds(d->dataset->GetBounds());
this->draw();
}
......
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