From: Anthony Geay Date: Fri, 15 May 2015 07:23:47 +0000 (+0200) Subject: 0023096: [CEA 1518] load script python : ServerModifTime does not exist X-Git-Tag: V7_6_0rc1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FV7_6_BR;p=modules%2Fparavis.git 0023096: [CEA 1518] load script python : ServerModifTime does not exist - In multiclient mode updateInformationAndDomains method is called systematicaly after any modification server side. So to make AllArrays entries appear in trace the FieldsStatus must be modified. - Improvement of implementation proposed for PAL23021. --- diff --git a/src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.cxx b/src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.cxx index a7a35713..00b7dd62 100644 --- a/src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.cxx +++ b/src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.cxx @@ -121,7 +121,7 @@ public: QMap TreeItemToPropMap; }; -pqMEDReaderPanel::pqMEDReaderPanel(pqProxy *object_proxy, QWidget *p):Superclass(object_proxy,p),_reload_req(false),_is_fields_status_changed(false),_optional_widget(0),_my_mtime(0),_sm_prop_remote_mtime(0) +pqMEDReaderPanel::pqMEDReaderPanel(pqProxy *object_proxy, QWidget *p):Superclass(object_proxy,p),_reload_req(false),_optional_widget(0),_my_mtime(0),_sm_prop_remote_mtime(0) { initAll(); } @@ -349,21 +349,6 @@ void pqMEDReaderPanel::linkServerManagerProperties() this->Superclass::linkServerManagerProperties(); } -void pqMEDReaderPanel::paintEvent(QPaintEvent *event) -{ - if(_sm_prop_remote_mtime) - { - int remoteMTimeVal(_sm_prop_remote_mtime->GetElement(0)); - if(remoteMTimeVal>_my_mtime) - { - //std::cout << "Refresh MEDReader panel due to external update." << std::endl; - updateCheckStatusOfLev4FromServerState(); - _my_mtime=remoteMTimeVal; - } - } - pqNamedObjectPanel::paintEvent(event); -} - void pqMEDReaderPanel::updateSIL() { if(_reload_req) @@ -586,14 +571,22 @@ int pqMEDReaderPanel::getMaxNumberOfTS() const void pqMEDReaderPanel::updateInformationAndDomains() { + //std::cerr << "updateInformationAndDomains called !" << std::endl; pqNamedObjectPanel::updateInformationAndDomains(); - if(_is_fields_status_changed) + if(_sm_prop_remote_mtime) { - vtkSMProxy *proxy(this->proxy()); - vtkSMProperty *SMProperty(proxy->GetProperty("FieldsStatus")); - SMProperty->Modified();// agy : THE LINE FOR 7.5.1 ! - _is_fields_status_changed=false; + int remoteMTimeVal(_sm_prop_remote_mtime->GetElement(0)); + if(remoteMTimeVal>_my_mtime) + { + //std::cout << "Refresh MEDReader panel due to external update." << std::endl; + updateCheckStatusOfLev4FromServerState(); + _my_mtime=remoteMTimeVal; + } } + // now force modification of FieldsStatus property to appear in trace as AllArrays. + vtkSMProxy *proxy(this->proxy()); + vtkSMProperty *SMProperty(proxy->GetProperty("FieldsStatus")); + SMProperty->Modified();// agy : THE LINE FOR 7.5.1 ! } /*! @@ -648,8 +641,7 @@ void pqMEDReaderPanel::somethingChangedInFieldRepr() // ((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; + // to detect modified properties. The idea here is to make FieldsTreeInfo property deprecated and so avoid to appear in trace. Don't know why InformationOnly property appear in trace ? setModified(); } diff --git a/src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.h b/src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.h index 3d8792de..f7d07f3d 100644 --- a/src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.h +++ b/src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.h @@ -56,14 +56,12 @@ protected: void somethingChangedInFieldRepr(); /// populate widgets with properties from the server manager virtual void linkServerManagerProperties(); - virtual void paintEvent(QPaintEvent *event); void initAll(); class pqUI; pqUI* UI; std::vector _all_lev4; private: bool _reload_req; - bool _is_fields_status_changed; std::set > _leaves; VectBoolWidget *_optional_widget; int _my_mtime;