X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fgenericgui%2FGuiEditor.cxx;h=c50a41dda7e654fa9519e829a813650acd5e2086;hb=884c24e399ddcf623cee5d6d7136a06255b6f3f0;hp=45dc0e33b13bfe305a1d17a7fd5a40f000ebfb43;hpb=216c15bc1ec59372c7313d273cc0fa1d206a68d4;p=modules%2Fyacs.git diff --git a/src/genericgui/GuiEditor.cxx b/src/genericgui/GuiEditor.cxx index 45dc0e33b..c50a41dda 100644 --- a/src/genericgui/GuiEditor.cxx +++ b/src/genericgui/GuiEditor.cxx @@ -372,7 +372,7 @@ SubjectDataPort* GuiEditor::CreateOutputPort(SubjectElementaryNode* seNode, /*! * Subject shrink or expand, command from popup menu: needs a valid selection */ -void GuiEditor::shrinkExpand() { +void GuiEditor::shrinkExpand(Qt::KeyboardModifiers kbModifiers) { DEBTRACE("GuiEditor::shrinkExpand"); Subject* sub = QtGuiContext::getQtCurrent()->getSelectedSubject(); @@ -393,12 +393,14 @@ void GuiEditor::shrinkExpand() { return; }; - if (sni->isExpanded()) { - sni->setExpanded(false); - } else { - sni->setExpanded(true); - }; - sni->reorganizeShrinkExpand(); + ShrinkMode aShrinkMode = CurrentNode; + if (kbModifiers == Qt::ControlModifier) { + aShrinkMode = ElementaryNodes; + } else if (kbModifiers == (Qt::ShiftModifier|Qt::ControlModifier)) { + aShrinkMode = ChildrenNodes; + } + + sni->reorganizeShrinkExpand(aShrinkMode); sni->showOutScopeLinks(); sni->updateLinks(); }