]> sigrok.org Git - pulseview.git/commitdiff
Header: Added group/ungroup key-combos
authorJoel Holdsworth <redacted>
Sun, 9 Nov 2014 10:21:33 +0000 (10:21 +0000)
committerJoel Holdsworth <redacted>
Wed, 19 Nov 2014 10:39:41 +0000 (10:39 +0000)
pv/view/header.cpp

index 23cbb0ffa79979d08c764e1809c8248cef406ae3..7be491a9d73a9a59d38a126036c7decbcb7b323f 100644 (file)
@@ -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<RowItem> 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()