Changeset 11089:c110dfb1b0e7 in orange


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

Fixed an error when showing help for add-on widgets.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/orngHelp.py

    r9671 r11089  
    3131         
    3232    def showHelpFor(self, widgetInfo, bringToFront=False): 
    33         helpFileName = os.path.join(widgetInfo.docDir(), "%s.htm" % (widgetInfo.fileName[2:])).replace("\\", "/") 
    34         if not os.path.exists(helpFileName): 
     33        helpFileName = None 
     34        docdir = widgetInfo.docDir() 
     35        if docdir is not None: 
     36            helpFileName = os.path.join(widgetInfo.docDir(), "%s.htm" % (widgetInfo.fileName[2:])).replace("\\", "/") 
     37 
     38        if helpFileName is None or not os.path.exists(helpFileName): 
    3539            QMessageBox.warning( None, "Not available", "Sorry, there is no documentation available for this widget.", QMessageBox.Ok) 
    3640            return 
Note: See TracChangeset for help on using the changeset viewer.