Ignore:
Timestamp:
05/27/13 15:02:37 (11 months ago)
Author:
Martin Frlin <martin.frlin@…>
Branch:
default
Message:

Added selection deleting with delete key.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/Data/OWPaintData.py

    r11313 r11566  
    66<icon>icons/PaintData.svg</icon> 
    77""" 
    8  
    98import orange 
     9 
     10from PyQt4 import QtCore 
    1011 
    1112from OWWidget import * 
     
    110111        """ Called when the tool is installed on a graph. 
    111112        """ 
     113        pass 
    112114         
    113115    def eventFilter(self, obj, event): 
     
    868870        self.optionsLayout.setCurrentWidget(option) 
    869871        self.currentTool.setGraph(self.graph) 
     872 
    870873         
    871874    def onDomainChanged(self, *args): 
     
    880883    def onDataChanged(self): 
    881884        self.dataChangedFlag = True 
     885 
     886    def keyPressEvent(self, event): 
     887        if event.key() == QtCore.Qt.Key_Delete and isinstance(self.currentTool, SelectTool): 
     888            self.currentTool.deleteSelected() 
    882889     
    883890    def commitIf(self): 
Note: See TracChangeset for help on using the changeset viewer.