]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Little cleanup of filters (remove useless methods)
authorAnthony Geay <anthony.geay@edf.fr>
Thu, 9 Oct 2014 06:36:16 +0000 (08:36 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Thu, 9 Oct 2014 06:36:16 +0000 (08:36 +0200)
src/Plugins/MEDReader/ParaViewPlugin/pqExtractCellTypePanel.h
src/Plugins/MEDReader/ParaViewPlugin/pqExtractGroupPanel.cxx
src/Plugins/MEDReader/ParaViewPlugin/pqExtractGroupPanel.h

index 56136640aaec27bad921d107a1478628aab8c614..1fbfbf9fbbb5d2c54d58bef763267626a9798426 100644 (file)
@@ -44,7 +44,6 @@ protected:
   virtual void linkServerManagerProperties();
   class pqUI;
   pqUI* UI;
-  std::vector<pqTreeWidgetItemObject *> _all_lev4;
 };
 
 #endif
index 93698ae6788d8e8283d06bcc9a8ac2d8793b9883..004a4e191be9dbcf7cf1883a6231bbbb8c530743 100644 (file)
@@ -271,61 +271,6 @@ void pqExtractGroupPanel::updateSIL()
     }
 }
 
-void pqExtractGroupPanel::aLev4HasBeenFired()
-{
-  pqTreeWidgetItemObject *zeItem(qobject_cast<pqTreeWidgetItemObject *>(sender()));
-  if(!zeItem)
-    return;
-  pqTreeWidgetItemObject *father(dynamic_cast<pqTreeWidgetItemObject *>(zeItem->QTreeWidgetItem::parent()));
-  if(!father)
-    return ;
-  if(zeItem->isChecked())
-    {
-      // This part garantees that all leaves having not the same father than zeItem are desactivated
-      foreach(pqTreeWidgetItemObject* elt,this->_all_lev4)
-        {
-          QTreeWidgetItem *testFath(elt->QTreeWidgetItem::parent());
-          if(testFath!=father)
-            if(elt->isChecked())
-              elt->setChecked(false);
-        }
-      //If all leaves are checked the father is check too
-      bool allItemsAreChked(true);
-      for(int i=0;i<father->childCount() && allItemsAreChked;i++)
-        {
-          pqTreeWidgetItemObject *elt(dynamic_cast<pqTreeWidgetItemObject *>(father->child(i)));
-          if(elt && !elt->isChecked())
-            allItemsAreChked=false;
-        }
-      if(allItemsAreChked && !father->isChecked())
-        father->setChecked(true);
-    }
-  else
-    {
-      // if all are unchecked - check it again
-      bool allItemsAreUnChked(true);
-      foreach(pqTreeWidgetItemObject* elt,this->_all_lev4)
-        {
-          if(elt && elt->isChecked())
-            allItemsAreUnChked=false;
-        }
-      if(allItemsAreUnChked)
-        zeItem->setChecked(true);// OK zeItem was required to be unchecked but as it is the last one. Recheck it !
-      else
-        {// if all items are uncheked inside a same parent - uncheck the parent
-          allItemsAreUnChked=true;
-          for(int i=0;i<father->childCount() && allItemsAreUnChked;i++)
-            {
-              pqTreeWidgetItemObject *elt(dynamic_cast<pqTreeWidgetItemObject *>(father->child(i)));
-              if(elt && elt->isChecked())
-            allItemsAreUnChked=false;
-            }
-          if(allItemsAreUnChked && father->isChecked())
-            father->setChecked(false);
-        } 
-    }
-}
-
 std::map<std::string,int> pqExtractGroupPanel::DeduceMapOfFamilyFromSIL(vtkMutableDirectedGraph *graph)
 {
   std::map<std::string,int> ret;
index c52644b2e471d651a670fd6c47dfcc6760c540bf..507f9c8bb18e86cc089b68195f1e56463a7af63f 100644 (file)
@@ -38,7 +38,6 @@ public:
   pqExtractGroupPanel(pqProxy* proxy, QWidget* p = NULL);
   ~pqExtractGroupPanel();
 protected slots:
-  void aLev4HasBeenFired();
   void updateSIL();
 private:
   static std::map<std::string,int> DeduceMapOfFamilyFromSIL(vtkMutableDirectedGraph *graph);
@@ -47,7 +46,6 @@ protected:
   virtual void linkServerManagerProperties();
   class pqUI;
   pqUI* UI;
-  std::vector<pqTreeWidgetItemObject *> _all_lev4;
 };
 
 #endif