Commit 914b197f authored by Pierre Fernique's avatar Pierre Fernique

add current_field_name accessor

parent 031a0baf
......@@ -335,6 +335,11 @@ void dtkVisualizationDecoratorScalarColorMap::hide(void) {
}
}
QString dtkVisualizationDecoratorScalarColorMap::currentFieldName() const
{
return d->current_field_name;
}
bool dtkVisualizationDecoratorScalarColorMap::setCurrentFieldName(const QString& scalar_field_name)
{
if (scalar_field_name.isEmpty()) {
......
......@@ -42,6 +42,7 @@ public:
void hide(void);
protected:
QString currentFieldName() const;
bool setCurrentFieldName(const QString&);
void draw(void) override;
......
......@@ -188,7 +188,6 @@ void dtkVisualizationDecoratorScalarGlyphs::setData(const QVariant& data)
if (d->eligible_field_names.size() > 0) {
d->eligible_field_names.sort();
if(d->fields_box) {
d->fields_box->clear();
d->fields_box->addItems(d->eligible_field_names);
......@@ -397,6 +396,11 @@ void dtkVisualizationDecoratorScalarGlyphs::hide(void) {
}
}
QString dtkVisualizationDecoratorScalarGlyphs::currentFieldName() const
{
return d->current_field_name;
}
bool dtkVisualizationDecoratorScalarGlyphs::setCurrentFieldName(const QString& scalar_field_name)
{
if (scalar_field_name.isEmpty()) {
......@@ -464,6 +468,11 @@ bool dtkVisualizationDecoratorScalarGlyphs::setCurrentFieldName(const QString& s
d->mapper->Modified();
d->actor->Modified();
if (this->canvas() && this->canvas()->interactor()) {
this->canvas()->interactor()->Render();
this->canvas()->renderer()->GetRenderWindow()->Render();
}
emit this->currentGlyphsSizeChanged(glyphs_size);
emit this->currentGlyphsSourceChanged(glyphs_source);
......
......@@ -53,6 +53,7 @@ signals:
void currentGlyphsSourceChanged(const QString&);
protected:
QString currentFieldName() const;
bool setCurrentFieldName(const QString&);
void draw(void) override;
......
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