+
+void pqMEDReaderPanel::updateInformationAndDomains()
+{
+ pqNamedObjectPanel::updateInformationAndDomains();
+ if(_is_fields_status_changed)
+ {
+ vtkSMProxy *proxy(this->proxy());
+ vtkSMProperty *SMProperty(proxy->GetProperty("FieldsStatus"));
+ SMProperty->Modified();// agy : THE LINE FOR 7.5.1 !
+ _is_fields_status_changed=false;
+ }
+}
+
+/*!
+ * This slot is called by this->UI->Fields when one/several leaves have been modified.
+ */
+void pqMEDReaderPanel::somethingChangedInFieldRepr()
+{
+ ///
+ vtkSMProxy *proxy(this->proxy());
+ vtkSMProperty *SMProperty(proxy->GetProperty("FieldsStatus"));
+ vtkSMStringVectorProperty *sm(dynamic_cast<vtkSMStringVectorProperty *>(SMProperty));
+ unsigned int nb(sm->GetNumberOfElements());
+ std::vector<std::string> sts(nb);
+ for(unsigned int i=0;i<nb;i++)
+ sts[i]=sm->GetElement(i);
+ ///
+ pqExodusIIVariableSelectionWidget *sc(this->UI->Fields);
+ for(int i0=0;i0<sc->topLevelItemCount();i0++)
+ {
+ QTreeWidgetItem *lev0(sc->topLevelItem(i0));//TS
+ for(int i1=0;i1<lev0->childCount();i1++)
+ {
+ QTreeWidgetItem *lev1(lev0->child(i1));//Mesh
+ for(int i2=0;i2<lev1->childCount();i2++)
+ {
+ QTreeWidgetItem *lev2(lev1->child(i2));//Comp
+ for(int i3=0;i3<lev2->childCount();i3++)
+ {
+ QTreeWidgetItem *lev3(lev2->child(i3));
+ pqTreeWidgetItemObject *scc(dynamic_cast<pqTreeWidgetItemObject *>(lev3));
+ int ll(scc->property("PosInStringVector").toInt());
+ int v(scc->isChecked());
+ std::ostringstream oss; oss << v;
+ sts[2*ll+1]=oss.str();
+ }
+ }
+ }
+ }
+ ///
+ const char **args=new const char *[nb];
+ for(unsigned int i=0;i<nb;i++)
+ {
+ args[i]=sts[i].c_str();
+ }
+ {//agy : let's go to put info in property FieldsStatus
+ int iup(sm->GetImmediateUpdate());
+ //sm->SetNumberOfElements(0);
+ sm->SetElements(args,nb);
+ proxy->UpdateVTKObjects(); // push properties states abroad
+ sm->SetImmediateUpdate(iup);
+ }
+ delete [] args;
+ //
+ ((vtkSMSourceProxy *)proxy)->UpdatePipelineInformation();//performs an update of all properties of proxy and proxy itself
+ // here wonderful proxy is declared modified right after FieldsStatus and FieldsTreeInfo -> IMPORTANT : The updated MTime of proxy will be the ref
+ // to detect modified properties.
+ _is_fields_status_changed=true;
+ setModified();
+}
+