Changeset 1751:a3db39d180ab in orange-bioinformatics


Ignore:
Timestamp:
04/18/13 20:08:07 (12 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Fixed KEGG Pathway Browser organism list initialization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _bioinformatics/widgets/OWKEGGPathwayBrowser.py

    r1748 r1751  
    388388 
    389389        self.setEnabled(False) 
     390        self.infoLabel.setText("Fetching organism definitions\n") 
    390391        QTimer.singleShot(100, self.UpdateOrganismComboBox) 
    391392 
     
    414415            # in the common list. 
    415416 
    416             self.infoLabel.setText("Fetching organism definitions\n") 
    417  
    418417            keys = map(genome.org_code_to_entry_key, essential + common) 
    419418 
     
    429428 
    430429            self.organismCodes = [code for code, desc in codes] 
     430            self.organismComboBox.clear() 
    431431            self.organismComboBox.addItems(items) 
     432            self.organismComboBox.setCurrentIndex(self.organismIndex) 
    432433        finally: 
    433434            self.setEnabled(True) 
     
    923924if __name__ == "__main__": 
    924925    app = QApplication(sys.argv) 
     926    w = OWKEGGPathwayBrowser() 
     927    w.show() 
     928 
    925929    data = Orange.data.Table("brown-selected.tab") 
    926     w = OWKEGGPathwayBrowser() 
    927     w.UpdateOrganismComboBox() 
    928     w.show() 
    929     w.SetData(Orange.data.Table(data[:])) 
    930     QTimer.singleShot(10, w.handleNewSignals) 
     930 
     931    QTimer.singleShot(1000, lambda: w.SetData(data)) 
     932    QTimer.singleShot(1500, w.handleNewSignals) 
    931933 
    932934    app.exec_() 
Note: See TracChangeset for help on using the changeset viewer.