Commit 4f07e767 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas

disable interaction of orientation marker

parent eed26fe8
......@@ -112,6 +112,8 @@ dtkVisualizationDecoratorAxes::dtkVisualizationDecoratorAxes(void): dtkVisualiza
connect(d->show_axes_cb, &QCheckBox::stateChanged, [=] (int state) {
this->saveSettings("show_axes", state == Qt::Checked);
d->marker->SetEnabled(state == Qt::Checked);
if (state == Qt::Checked)
d->marker->SetInteractive(false);
this->draw();
});
......@@ -169,11 +171,13 @@ void dtkVisualizationDecoratorAxes::setCanvas(dtkVisualizationCanvas *canvas)
}
d->marker->SetInteractor(d->view->renderer()->GetRenderWindow()->GetInteractor());
d->view->renderer()->AddActor(d->cube_axes_actor);
d->marker->SetEnabled(d->show_axes_cb->checkState() == Qt::Checked);
if (d->show_axes_cb->checkState() == Qt::Checked) {
d->marker->SetEnabled(true);
d->marker->SetInteractive(false);
}
d->cube_axes_actor->SetCamera(d->view->renderer()->GetActiveCamera());
d->view->renderer()->AddActor(d->cube_axes_actor);
if(!d->dataset) {
d->cube_axes_actor->SetBounds(d->view->renderer()->ComputeVisiblePropBounds());
......@@ -189,6 +193,7 @@ void dtkVisualizationDecoratorAxes::unsetCanvas(void)
d->marker->SetEnabled(false);
d->marker->SetInteractor(nullptr);
d->cube_axes_actor->SetCamera(nullptr);
}
d->view = nullptr;
......
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