Commit 59db760f authored by KLOCZKO Thibaud's avatar KLOCZKO Thibaud

Fix update of spinbox controlling isoline count.

parent 418dd3fb
......@@ -81,7 +81,6 @@ dtkVisualizationDecoratorScalarIsolines::dtkVisualizationDecoratorScalarIsolines
d->actor = vtkSmartPointer<vtkActor>::New();
d->actor->SetMapper(d->mapper);
d->actor->SetVisibility(false);
//////////
// Inspectors creation and setup
......@@ -103,9 +102,7 @@ dtkVisualizationDecoratorScalarIsolines::dtkVisualizationDecoratorScalarIsolines
});
connect(d->isolines_counts_sb, QOverload<int>::of(&QSpinBox::valueChanged), [=] (int value) {
this->blockSignals(true);
this->setCurrentIsolinesCount(value);
this->blockSignals(false);
this->draw();
});
......@@ -113,6 +110,8 @@ dtkVisualizationDecoratorScalarIsolines::dtkVisualizationDecoratorScalarIsolines
d->isolines_counts_sb->setObjectName("Count");
d_func()->inspectors << d->show_actor_cb << d->isolines_counts_sb;
this->setVisibility(false);
}
dtkVisualizationDecoratorScalarIsolines::~dtkVisualizationDecoratorScalarIsolines(void)
......@@ -140,6 +139,10 @@ void dtkVisualizationDecoratorScalarIsolines::touch(void)
auto count = d->isolines_counts[field_name];
d->isolines_counts_sb->blockSignals(true);
d->isolines_counts_sb->setValue(count);
d->isolines_counts_sb->blockSignals(false);
d->isolines->GenerateValues(count, isoline_range[0], isoline_range[1]);
d->isolines->Modified();
}
......@@ -213,6 +216,7 @@ void dtkVisualizationDecoratorScalarIsolines::unsetCanvas(void)
void dtkVisualizationDecoratorScalarIsolines::setVisibility(bool b)
{
d->isolines_counts_sb->setEnabled(b);
dtkVisualizationDecoratorWithClut::setVisibility(b);
d->actor->SetVisibility(b);
......
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