From 26e6c75825636b014696f314fd086bc2f5ce9092 Mon Sep 17 00:00:00 2001 From: Johannes Pohl Date: Thu, 6 Jun 2019 18:01:11 +0200 Subject: [PATCH] fix #655 --- src/urh/ui/ListWidget.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/urh/ui/ListWidget.py b/src/urh/ui/ListWidget.py index 1da62a819a..91d5147e36 100644 --- a/src/urh/ui/ListWidget.py +++ b/src/urh/ui/ListWidget.py @@ -34,7 +34,8 @@ def dragEnterEvent(self, event: QDragEnterEvent): def eventFilter(self, sender, event): if event.type() == QEvent.ChildRemoved: self.internalMove.emit() - elif event.type() == QEvent.KeyPress and (event.key() == Qt.Key_Delete or event.key() == Qt.Key_Backspace): + elif event.type() == QEvent.KeyPress and event.key() in (Qt.Key_Delete, Qt.Key_Backspace)\ + and self.currentItem() is not None: item = self.currentRow() item_name = self.currentItem().text() self.active_element_text = item_name