How to trigger auto-apply

Hello everyone,

I created several plugins (source + filters) and a patch which could alter source’s / filter’s properties. However, when I change one of these properties (programmatically, from the patch), the pipeline doesn’t update automatically, although I have turned ON Edit | Settings | General → Auto Apply. When I update the same properties by clicking on them in Properties panel, the pipeline is automatically updated. So, because of this, I need to get appropriate pqPipelineSource and set its state to pqProxy::MODIFIED which makes appropriate button green and after clicking it it automatically updates the pipeline correctly.

I update above properties using call: pqSMAdaptor::setElementProperty(proxy->GetProperty(“PropertyName”), NewPropertyValue);

Is there a way to make this automatically? I mean, some regular way, without finding QWidget representing Apply button and sending it a clicked() signal :slight_smile:

Thanks,
Nenad.

Which version of ParaView are you using ? This was improved recently.

Hi Mathieu,

Thanks for responding. I use ParaView v5.11.0 sources (release), C++ and Visual Studio 2019 x64.

Thanks,
Nenad.

pqPVApplicationCore::applyPipeline should do the trick

And it does :slight_smile:

Mathieu, thank you very much. It worked perfectly!

Thanks,
Nenad.

1 Like