<div dir="ltr"><div class="gmail_extra"><span style="font-family:arial,sans-serif;font-size:13px">Felipe,</span></div><div class="gmail_extra"><font face="arial, sans-serif"><br></font></div><div class="gmail_extra"><font face="arial, sans-serif">Where is the code to SetElement(...) called? In general if you call SetElement(..), there's no reason why you cannot simply call proxy->UpdateVTKObjects() to push the changes immediately after. You're already veering away from how the apply/reset mechanism operates.</font></div>
<div class="gmail_extra"><span style="font-family:arial,sans-serif"><br></span></div><div class="gmail_extra"><span style="font-family:arial,sans-serif">For apply/reset to work correctly, pqPropertyWidget subclass shouldn't change any SMProperty except in overloaded </span><font face="arial, sans-serif">pqPropertyWidget::apply() method. Anytime the pqPropertyWidget is "modified", it should instead fire the pPropertyWidget::changeAvailable() and/or pqPropertyWidget::changeFinished() signals. Then, on "Apply" (or "Reset"), the appropriate apply()/reset() method will be called to update the property.</font><br>
</div><div class="gmail_extra"><font face="arial, sans-serif"><br></font></div><div class="gmail_extra"><font face="arial, sans-serif">Hopefully that's clarifies things a little. I am sure this could be explained better, alas. Maybe if you send me the code I may be able to explain better.</font></div>
<div class="gmail_extra"><font face="arial, sans-serif"><br></font></div><div class="gmail_extra"><font face="arial, sans-serif">Utkarsh</font></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 27, 2014 at 9:54 AM, Felipe Bordeu <span dir="ltr"><<a href="mailto:felipe.bordeu@ec-nantes.fr" target="_blank">felipe.bordeu@ec-nantes.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br>
<br>
I have my plugin (reader) with a custom panel (using the new<br>
architecture for panels). Everything was working perfectly in the 4.0.1<br>
version.<br>
<br>
But now (in v4.1 linux from web) all the changes BEFORE the first time I<br>
hit apply are ignored.<br>
<br>
I have a custom panel with a QTreeWidgetItem that is populated with the<br>
meta data of the file and I can check some items to be loaded. I use<br>
some logic to determine if the user can check a item or not. All the<br>
code reduce to:<br>
<br>
vtkSMStringVectorProperty *VisualizationSpaceStatus =<br>
vtkSMStringVectorProperty::SafeDownCast(proxy()->GetProperty("VisualizationSpaceStatus"));<br>
VisualizationSpaceStatus->SetElement(itemindex*2+1,state.c_str());<br>
VisualizationSpaceStatus->Modified ();<br>
<br>
to set the check state.<br>
<br>
Does anyone know why the first time I hit Apply the data is not<br>
transmitted to the server?????<br>
<br>
this is the xml part of this property:<br>
<br>
<!--<br>
================================================================== --><br>
<StringVectorProperty name="VisualizationSpaceInfo"<br>
information_only="1" immediate_update="1"><br>
<ArraySelectionInformationHelper<br>
attribute_name="VisualizationSpace"/><br>
</StringVectorProperty><br>
<br>
<StringVectorProperty<br>
name="VisualizationSpaceStatus"<br>
command="SetVisualizationSpaceStatus"<br>
number_of_elements="0"<br>
repeat_command="1"<br>
number_of_elements_per_command="2"<br>
element_types="2 0"<br>
information_property="VisualizationSpaceInfo"<br>
animateable="0"<br>
label="Visualization Space"<br>
panel_widget="SpaceTimeSelector"<br>
><br>
<br>
<ArraySelectionDomain name="array_list" ><br>
<RequiredProperties><br>
<Property name="VisualizationSpaceInfo" function="ArrayList"/><br>
</RequiredProperties><br>
</ArraySelectionDomain><br>
</StringVectorProperty><br>
<br>
<br>
Thanks to all<br>
<br>
--<br>
Felipe Bordeu Weldt<br>
Ingénieur de Recherche<br>
-------------------------------------<br>
Tél. : 33 (0)2 40 37 16 57<br>
Fax. : 33 (0)2 40 74 74 06<br>
<a href="mailto:Felipe.Bordeu@ec-nantes.fr">Felipe.Bordeu@ec-nantes.fr</a><br>
Institut GeM - UMR CNRS 6183<br>
École Centrale Nantes<br>
1 Rue de La Noë, 44321 Nantes, FRANCE<br>
-------------------------------------<br>
_______________________________________________<br>
Paraview-developers mailing list<br>
<a href="mailto:Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
</blockquote></div><br></div></div>