[Paraview-developers] "Greedy filter"
Cornelis Bockemühl
cornelis.bockemuehl at gmail.com
Wed May 2 08:49:30 EDT 2018
Hello all,
I managed to write a Paraview filter (in C++) that has the strange
property to always "grab" the focus back if another filter is attached
and "applied" to the pipeline - which is actually not really my
intention!
More clearly what happens: I have some data object, then I add my new
filter, let's call it "NEWFILTER", and apply. After this, everything
works ok:
- the display in the render view switches from the previous
object/filter in the pipeline to NEWFILTER,
- and the same does the focus. Meaning: the currently selected item in
the pipeline is also NEWFILTER, so I could e.g. change some settings
(and re-Apply), or choose which attribute to display in the view. So
far so good.
Now I want to attach another filter, e.g. a Clip filter. But when I
press Apply there, the result is strange:
- the display is for the Clip filter - as expected,
- but the focus is back on NEWFILTER
Of course I can manually click on the Clip filter to change this, but
this is not normal Paraview behaviour! Even more: If I attach another
and still another filter to the pipeline, the behaviour is always the
same: on Apply the focus jumps back to NEWFILTER - which is why I am
calling NEWFILTER a "greedy filter" in the title.
One more thing I can say about that filter: I actually derived it from
an existing one, which is the Calculator filter. I wanted to change a
few things for my own purposes: work for cell attributes only, and with
the option to work only on cells that are selected. For the selection
of cells I also wrote my own Property panel, so the cause of the
strange behaviour could also be inside that one.
All this works nicely and does what I expect, but I would like to get
rid also of this useless "greedyness"!
If somebody has a hint what could cause such a behaviour I may try the
change. Otherwise I can also send the source code to whoever wants to
have a look inside.
Thanks for any helpful hint!
Regards,
Cornelis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview-developers/attachments/20180502/9df6de52/attachment.html>
More information about the Paraview-developers
mailing list