From: Joel Holdsworth Date: Sun, 9 Nov 2014 10:21:33 +0000 (+0000) Subject: Header: Added group/ungroup key-combos X-Git-Tag: pulseview-0.3.0~442 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=14ca8a8deb6fe6d96567aa11a669dce68af67885;p=pulseview.git Header: Added group/ungroup key-combos --- diff --git a/pv/view/header.cpp b/pv/view/header.cpp index 23cbb0ff..7be491a9 100644 --- a/pv/view/header.cpp +++ b/pv/view/header.cpp @@ -299,16 +299,16 @@ void Header::keyPressEvent(QKeyEvent *e) { assert(e); - switch (e->key()) - { - case Qt::Key_Delete: + if (e->key() == Qt::Key_Delete) { for (const shared_ptr r : _view) if (r->selected()) r->delete_pressed(); - break; - } } + else if (e->key() == Qt::Key_G && e->modifiers() == Qt::ControlModifier) + on_group(); + else if (e->key() == Qt::Key_U && e->modifiers() == Qt::ControlModifier) + on_ungroup(); } void Header::on_signals_moved()