]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Bug of @ in fieldname and bug on reload where first entry is not systematically reche...
authorgeay <anthony.geay@cea.fr>
Wed, 26 Mar 2014 14:01:39 +0000 (15:01 +0100)
committergeay <anthony.geay@cea.fr>
Wed, 26 Mar 2014 14:01:39 +0000 (15:01 +0100)
src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx
src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.cxx
src/Plugins/MEDReader/TODO.txt

index 0721775a5ee12fab90ae0c97063c2e62e1e1541d..107d8772c80bc49bfdb0d4c5a80de70d3c94ec9a 100644 (file)
@@ -1020,7 +1020,8 @@ int MEDFileFieldRepresentationTree::getIdHavingZeName(const char *name) const
       for(std::vector< MEDFileFieldRepresentationLeaves >::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
         if((*it2).containZeName(name,ret))
           return ret;
-  throw INTERP_KERNEL::Exception("MEDFileFieldRepresentationTree::getIdHavingZeName : No such a name !");
+  std::ostringstream msg; msg << "MEDFileFieldRepresentationTree::getIdHavingZeName : No such a name \"" << name << "\" !";
+  throw INTERP_KERNEL::Exception(msg.str().c_str());
 }
 
 bool MEDFileFieldRepresentationTree::changeStatusOfAndUpdateToHaveCoherentVTKDataSet(int id, bool status) const
index 17d7bb4617a8f56cadd9944ceb7dd0798d7f27af..8e3eebdd21be24d52ea7864f5d2110eb009ce4e4 100644 (file)
@@ -51,6 +51,8 @@
 
 #include <QHeaderView>
 
+#include <sstream>
+
 static const char ZE_SEP[]="@@][@@";
 
 class PixSingle
@@ -224,7 +226,7 @@ void pqMEDReaderPanel::initAll()
                 {
                   vtkIdType id4(it3Arrs->Next());
                   std::string name3CppFull((const char *)verticesNames2->GetValue(id4));
-                  std::size_t pos(name3CppFull.find_first_of(ZE_SEP));
+                  std::size_t pos(name3CppFull.find(ZE_SEP));
                   std::string name3Only(name3CppFull.substr(0,pos)); std::string spatialDiscr(name3CppFull.substr(pos+sizeof(ZE_SEP)-1));
                   QString name3(QString::fromStdString(name3Only)); QList<QString> strs3; strs3.append(name3);
                   QString toolTipName3(name3+QString(" (")+spatialDiscr.c_str()+QString(")"));
@@ -250,8 +252,16 @@ void pqMEDReaderPanel::initAll()
                      item3->setData(0,Qt::ToolTipRole,toolTipName3);
                      item3->setData(0,Qt::DecorationRole,PixSingle::GetInstance().getPixFromStr(spatialDiscr));
                    }
-                  this->propertyManager()->registerLink(item3,"checked",SIGNAL(checkedStateChanged(bool)),this->proxy(),SMProperty,ll);
                   _leaves.insert(std::pair<pqTreeWidgetItemObject *,int>(item3,ll));
+                  std::ostringstream pdm; pdm << name0.toStdString() << "/" << name1.toStdString() << "/" << name2.toStdString() << "/" << name3CppFull;
+                  (static_cast<vtkSMStringVectorProperty *>(SMProperty))->SetElement(2*ll,pdm.str().c_str());
+                  char tmp2[2]; tmp2[0]=(kk==0?'1':'0'); tmp2[1]='\0';
+                  std::string tmp(tmp2);
+                  (static_cast<vtkSMStringVectorProperty *>(SMProperty))->SetElement(2*ll+1,tmp.c_str());
+                  //SMProperty->ResetToDefault();
+                  item2->setChecked(kk==0);
+                  item3->setChecked(kk==0);
+                  this->propertyManager()->registerLink(item3,"checked",SIGNAL(checkedStateChanged(bool)),this->proxy(),SMProperty,ll);
                   connect(item2,SIGNAL(checkedStateChanged(bool)),item3,SLOT(setChecked(bool)));
                   connect(item3,SIGNAL(checkedStateChanged(bool)),this,SLOT(aLev4HasBeenFired()));
                   ll++;
@@ -270,8 +280,6 @@ void pqMEDReaderPanel::initAll()
               it3Gts->Delete();
               it3->Delete();
               it3Arrs->Delete();
-              if(kk==0)
-                item2->setChecked(true);
               kk++;
             }
           it2->Delete();
index e0f1a2013b85c1e9855ff70419b3a006d61af3f5..7c598555b420b7a465e0e6d61a4dbbed154ab885 100644 (file)
@@ -61,4 +61,8 @@ when in STANDALONE mode.
 
 0 - Add the frequency information in mode mode in the name of arrays in DataSet.
 
-0 - Addition of MeshName property in ExtractGroup (see testMEDReader9.py)
\ No newline at end of file
+0 - Addition of MeshName property in ExtractGroup (see testMEDReader9.py)
+
+0 - Bug when fields contains @
+
+1 - Bug on reload the first leaf is not systematically activated.
\ No newline at end of file