Martin Frlin  committed f6ea199

Added selection deleting with delete key.

  • Participants
  • Parent commits 34029da
  • Branches default

Comments (0)

Files changed (1)

File Orange/OrangeWidgets/Data/

+import orange
-import orange
+from PyQt4 import QtCore
 from OWWidget import *
 from OWGraph import *
     def installed(self):
         """ Called when the tool is installed on a graph.
+        pass
     def eventFilter(self, obj, event):
         if event.type() == QEvent.MouseButtonPress:
         self.currentTool, self.currentOptionsWidget = tool, option = self.toolsStackCache[tool]
     def onDomainChanged(self, *args):
         if self.variablesModel:
     def onDataChanged(self):
         self.dataChangedFlag = True
+    def keyPressEvent(self, event):
+        if event.key() == QtCore.Qt.Key_Delete and isinstance(self.currentTool, SelectTool):
+            self.currentTool.deleteSelected()
     def commitIf(self):
         if self.commitOnChange and self.dataChangedFlag: