diff --git a/graphwidget.cpp b/graphwidget.cpp index 1e3de36..e018ff4 100644 --- a/graphwidget.cpp +++ b/graphwidget.cpp @@ -498,17 +498,23 @@ void GraphWidget::keyPressEvent(QKeyEvent *event) void GraphWidget::wheelEvent(QWheelEvent *event) { - if (QApplication::keyboardModifiers() == Qt::ControlModifier) + if (QApplication::keyboardModifiers() & Qt::ControlModifier) { - if (m_activeNode) + if (!m_activeNode) { - m_activeNode->setScale(pow((double)1.2, event->delta() / 120.0), - sceneRect()); + m_parent->statusBarMsg(tr("No active node.")); + return; + } + if (QApplication::keyboardModifiers() & Qt::ShiftModifier) + { + foreach(Node *node, m_activeNode->subtree()) + node->setScale(pow((double)1.2, event->delta() / 120.0), + sceneRect()); } else { - m_parent->statusBarMsg(tr("No active node.")); - return; + m_activeNode->setScale(pow((double)1.2, event->delta() / 120.0), + sceneRect()); } } else