Changeset 9305:95933b443a6a in orange


Ignore:
Timestamp:
12/05/11 19:09:03 (2 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
960526503fcec38df58f40e1bd879bccb5230ab7
Message:

Added lt method to UpdateTreeWidgetItem to enable sensible sorting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/OWDatabasesUpdate.py

    r8042 r9305  
    197197    def __contains__(self, item): 
    198198        return any(item.lower() in tag.lower() for tag in self.tags + [self.title]) 
     199     
     200    def __lt__(self, other): 
     201        return getattr(self, "title", "") < getattr(other, "title", "")  
    199202 
    200203class UpdateItemDelegate(QItemDelegate): 
Note: See TracChangeset for help on using the changeset viewer.