Ignore:
Timestamp:
01/31/13 15:43:04 (15 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Capturing help requests ("F1" key press) from OWBaseWidget.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/OWBaseWidget.py

    r11292 r11296  
    801801 
    802802    def openWidgetHelp(self): 
    803         if "widgetInfo" in self.__dict__:  # This widget is on a canvas. 
     803        if "widgetInfo" in self.__dict__ and \ 
     804                hasattr(qApp, "canvasDlg"): 
     805            # This widget is on a canvas. 
    804806            qApp.canvasDlg.helpWindow.showHelpFor(self.widgetInfo, True) 
    805807 
     
    807809        if e.key() in (Qt.Key_Help, Qt.Key_F1): 
    808810            self.openWidgetHelp() 
    809 #            e.ignore() 
    810811        elif (int(e.modifiers()), e.key()) in OWBaseWidget.defaultKeyActions: 
    811812            OWBaseWidget.defaultKeyActions[int(e.modifiers()), e.key()](self) 
Note: See TracChangeset for help on using the changeset viewer.