Commit 22466b14 authored by LACROIX Romain's avatar LACROIX Romain

Bugfix: the streams are now redrawn after click on 'change source type' (sphere/line).

parent 3674d8c0
......@@ -284,15 +284,11 @@ dtkVisualizationDecoratorVectorStreamTracer::dtkVisualizationDecoratorVectorStre
if (text == "Sphere") {
d->source_line_widget->SetEnabled(false);
d->source_sphere_widget->SetEnabled(true);
d->source_sphere->GetPolyData(d->source_data);
} else {
d->source_sphere_widget->SetEnabled(false);
d->source_line_widget->SetEnabled(true);
d->source_line->GetPolyData(d->source_data);
}
d->streamtracer->SetSourceData(d->source_data);
d->streamtracer->Modified();
this->touch();
this->draw();
});
......@@ -413,10 +409,12 @@ void dtkVisualizationDecoratorVectorStreamTracer::setData(const QVariant& data)
this->canvas()->renderer()->AddActor(d->actor);
d->source_sphere_widget->SetInteractor(this->canvas()->renderer()->GetRenderWindow()->GetInteractor());
d->source_line_widget->SetInteractor(this->canvas()->renderer()->GetRenderWindow()->GetInteractor());
d->source_line_widget->On();
d->source_sphere_widget->On();
if (d->cb_source_type->currentText() == "Sphere") {
d->source_sphere_widget->On();
d->source_line_widget->SetEnabled(false);
} else {
d->source_line_widget->On();
d->source_sphere_widget->SetEnabled(false);
}
}
......@@ -440,10 +438,12 @@ void dtkVisualizationDecoratorVectorStreamTracer::setCanvas(dtkVisualizationCanv
if (!d_func()->default_visibility) {
d_func()->default_visibility = true;
} else {
d->source_line_widget->On();
d->source_sphere_widget->On();
if (d->cb_source_type->currentText() == "Sphere") {
d->source_sphere_widget->On();
d->source_line_widget->SetEnabled(false);
} else {
d->source_line_widget->On();
d->source_sphere_widget->SetEnabled(false);
}
}
}
......
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