projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MarginWidget: Moved in keyPressEvent
[pulseview.git]
/
pv
/
view
/
marginwidget.cpp
diff --git
a/pv/view/marginwidget.cpp
b/pv/view/marginwidget.cpp
index e20e7b9f00afe664e72439969b73fe5894b6eca7..5a81c45933450b40e5aee63d36116b75eeba6b8b 100644
(file)
--- a/
pv/view/marginwidget.cpp
+++ b/
pv/view/marginwidget.cpp
@@
-108,6
+108,19
@@
void MarginWidget::contextMenuEvent(QContextMenuEvent *event)
menu->exec(event->globalPos());
}
menu->exec(event->globalPos());
}
+void MarginWidget::keyPressEvent(QKeyEvent *e)
+{
+ assert(e);
+
+ if (e->key() == Qt::Key_Delete)
+ {
+ const auto items = this->items();
+ for (auto &i : items)
+ if (i->selected())
+ i->delete_pressed();
+ }
+}
+
void MarginWidget::clear_selection()
{
const auto items = this->items();
void MarginWidget::clear_selection()
{
const auto items = this->items();