Salome HOME
Documentation for 0022615: [CEA 1014] Fold/unfold all the nodes of a block.
[modules/yacs.git] / src / genericgui / SceneProcItem.cxx
index 4ff34bc6f5a1f8bae6ce65bc7f05081acb79ca54..919d9510d044ee8f22ac57a206e1d832d0733c58 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2014  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -52,40 +52,3 @@ void SceneProcItem::popupMenu(QWidget *caller, const QPoint &globalPos)
   m.popupMenu(caller, globalPos);
 }
 
-void SceneProcItem::reorganizeShrinkExpand() {
-  if (_children.size() == 0)
-    return;
-  bool isExpanding = true;
-  DEBTRACE("SceneProcItem::reorganizeShrinkExpand " << _expanded << " " << _label.toStdString());
-  for (list<AbstractSceneItem*>::const_iterator it=_children.begin(); it!=_children.end(); ++it)
-    {
-      SceneItem* item = dynamic_cast<SceneItem*>(*it);
-      SceneNodeItem *sni = dynamic_cast<SceneNodeItem*>(item);
-      if (sni->isExpanded()) {
-         isExpanding = false;
-         break;
-      }
-    }
-  for (list<AbstractSceneItem*>::const_iterator it=_children.begin(); it!=_children.end(); ++it)
-    {
-      SceneItem* item = dynamic_cast<SceneItem*>(*it);
-      SceneNodeItem *sni = dynamic_cast<SceneNodeItem*>(item);
-      if (!isExpanding && sni->isExpanded()) {
-       sni->setExpanded(false);
-       item->shrinkExpandRecursive(false, true);
-       DEBTRACE("------------------------------- Hide " << item->getLabel().toStdString());
-      }
-      if (isExpanding && !sni->isExpanded()) {
-       sni->setExpanded(true);
-       item->shrinkExpandRecursive(true, false);
-       DEBTRACE("------------------------------- Show " << item->getLabel().toStdString());
-      }
-      item->shrinkExpandLink(isExpanding);
-    }
-  _ancestorShrinked = !isExpanding;
-  _width = _expandedWidth;
-  _height = _expandedHeight;
-  _shownState = expandShown;
-  adjustHeader();
-}
-