X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fgenericgui%2FSceneProcItem.cxx;h=b2e11d9d7d7abecd4476e0ec2f86aac34050ebec;hb=73af7eeb5a583a94c41c3fd88d150adf3efc9063;hp=4bfa58f56f56c73006084dd315e4d41878201075;hpb=14ddeddd588b20887c99de78c95d402527062012;p=modules%2Fyacs.git diff --git a/src/genericgui/SceneProcItem.cxx b/src/genericgui/SceneProcItem.cxx index 4bfa58f56..b2e11d9d7 100644 --- a/src/genericgui/SceneProcItem.cxx +++ b/src/genericgui/SceneProcItem.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2006-2014 CEA/DEN, EDF R&D +// Copyright (C) 2006-2022 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 @@ -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::const_iterator it=_children.begin(); it!=_children.end(); ++it) - { - SceneItem* item = dynamic_cast(*it); - SceneNodeItem *sni = dynamic_cast(item); - if (sni->isExpanded()) { - isExpanding = false; - break; - } - } - for (list::const_iterator it=_children.begin(); it!=_children.end(); ++it) - { - SceneItem* item = dynamic_cast(*it); - SceneNodeItem *sni = dynamic_cast(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(); -} -