Observer on ButtonPropertyWidget isn't Trigered on PV 5.6
Hi, We just bump our internal ParaView to 5.6 and One of our plugin stopped working. It is using a Button Property (pqCommandButtonPropertyWidget.cxx).
We added an observer on that property to update some camera options. Our plugin use a Custom SMProxy based on vtkSMLightProxy.
XML
<Property
name="CameraUpdate"
command="Modified"
panel_widget="command_button">
</Property>
Custom SMProxy
this->Observer->Owner = this;
vtkSMProperty* typeProperty = this->GetProperty("CameraUpdate");
typeProperty->AddObserver(vtkCommand::ModifiedEvent, this->Observer);
Bug
When ModifiedEvent is called by the Button, the filter is updated but that observer's callback is not triggered.
Solution
I found that the button widget class was modified and "this->Modfied()" was missing from the latest version.
-
5.6 , the command is invoked.
-
Previous Version 5.5.2 , the proprety is modified ( this->Modified) and then UpdateProperty is called which internally trigger invokeCommand.
So to resolve my problem, I added this->Modified() before line 77