[Paraview] Updating DataArraySelection Problem

Brian C. Panneton (CONTR) brian.c.panneton.ctr at us.army.mil
Thu Apr 21 13:02:58 EDT 2011


While working on my custom panel, I thought I had everything correct to 
allow a single QComboBox to populate a checkable QListWidget based on 
what was selected. However, now I am running into an issue where items 
added to the DataArraySelection do not get removed when I had thought 
they would. I have an example reader plugin which shows the problem. It 
is based off of the CSVImageReader, just so I can implement the panel.

Once you load a file, the QComboBox and QListWidget get populated like 
they should. Then if you press accept, you can see that the RequestData 
is run with the correct information. Then if you switch to the second 
option in the QComboBox, you can see that the QListWidget gets 
repopulated correctly. Then if you hit apply again, it seems to prepend 
the new options to the DataArraySelection when it should delete the 
current list and then add the new items. At this point if you check any 
box, updateSelection segfaults since there are more items in the 
DataArraySelection then on the GUI.

In my SetSource function, you can tell that there are only two items in 
the DataArraySelection. SetSource is the only place that adds/removes 
from the DataArraySelection, so I'm stumped as to why the previous items 
are still there.

I included a tarball of the test. It contains a csvim file to load.
Quick Steps: Load Plugin, Load csvim file, Press Accept, Switch 
QComboBox to 'Value 2', Press Accept, Click first checkbox = segfault.

Any help would be appreciated.
Thanks,
Brian Panneton


More information about the ParaView mailing list