Changeset 1922:3c4b5ab67b84 in orange-bioinformatics


Ignore:
Timestamp:
11/29/13 20:10:55 (5 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Ignore wheel events in organism combo box.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orangecontrib/bio/widgets/OWSelectGenes.py

    r1920 r1922  
    330330        layout.addWidget(b) 
    331331 
    332         self.organismsCombo = QComboBox() 
     332        self.organismsCombo = ComboBox(focusPolicy=Qt.StrongFocus) 
    333333        self.organismsCombo.addItem("...") 
    334334        self.organismsCombo.model().item(0).setEnabled(False) 
     
    13171317 
    13181318 
     1319class ComboBox(QComboBox): 
     1320    """ 
     1321    A combo box ignoring mouse wheel events. 
     1322    """ 
     1323    def wheelEvent(self, event): 
     1324        event.ignore() 
     1325        return 
     1326 
    13191327# All control character categories. 
    13201328_control = set(["Cc", "Cf", "Cs", "Co", "Cn"]) 
     
    13581366        self._stack.setSizePolicy(QSizePolicy.MinimumExpanding, 
    13591367                                  QSizePolicy.Fixed) 
    1360         self.orgcombo = QComboBox(minimumWidth=150) 
     1368        self.orgcombo = ComboBox(minimumWidth=150, focusPolicy=Qt.StrongFocus) 
    13611369        self.orgcombo.activated[int].connect(self._on_organismSelected) 
    13621370        self._stack.addWidget(self.orgcombo) 
Note: See TracChangeset for help on using the changeset viewer.