]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
0023096: [CEA 1518] load script python : ServerModifTime does not exist V7_6_BR fix_for_760 V7_6_0 V7_6_0rc1
authorAnthony Geay <anthony.geay@edf.fr>
Fri, 15 May 2015 07:23:47 +0000 (09:23 +0200)
committervsr <vsr@opencascade.com>
Fri, 15 May 2015 12:33:37 +0000 (15:33 +0300)
- 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.

src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.cxx
src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.h

index a7a357130ab43a26d410194ed5d2ec0314257ed9..00b7dd629a1afc8b089c9e7d45e0bf6705edd04c 100644 (file)
@@ -121,7 +121,7 @@ public:
   QMap<QTreeWidgetItem*, QString> 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();
 }
 
index 3d8792decd41a2a4b96c5ed6026126d2da65430d..f7d07f3d2fee0f075d253d32d7e4ac6edf77588e 100644 (file)
@@ -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<pqTreeWidgetItemObject *> _all_lev4;
 private:
   bool _reload_req;
-  bool _is_fields_status_changed;
   std::set<std::pair<pqTreeWidgetItemObject *,int> > _leaves;
   VectBoolWidget *_optional_widget;
   int _my_mtime;