Changeset 8953:3f50632eb9c7 in orange


Ignore:
Timestamp:
09/12/11 10:36:42 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
174182a266f8900c72acc2c5fb89ca0a4e08c3cf
Message:

References #944.
Fixed an error when a widget category has no widgets.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeCanvas/orngTabs.py

    r8042 r8953  
    576576        self.canvasDlg = canvasDlg 
    577577        cats = orngRegistry.readCategories(silent=True) 
    578         self.suggestDict = dict([(widget.name, widget) for widget in reduce(lambda x,y: x+y, [cat.values() for cat in cats.values()])]) 
     578        self.suggestDict = dict([(widget.name, widget) for widget in reduce(list.__add__, [cat.values() for cat in cats.values()], [])]) 
    579579        self.suggestItems = [QListWidgetItem(self.canvasDlg.getWidgetIcon(widget), widget.name) for widget in self.suggestDict.values()] 
    580580        self.categoriesYOffset = 0 
Note: See TracChangeset for help on using the changeset viewer.