示例#1
0
 def add_data_to_combo(self, data):
     """ Add a data object to the combo box, if not already present
     """
     if not self.client.can_image_data(data):
         return
     combo = self.ui.displayDataCombo
     try:
         pos = _find_combo_data(combo, data)
     except ValueError:
         combo.addItem(data.label, userData=data)
示例#2
0
 def add_data_to_combo(self, data):
     """ Add a data object to the combo box, if not already present
     """
     if not self.client.can_image_data(data):
         return
     combo = self.ui.displayDataCombo
     try:
         pos = _find_combo_data(combo, data)
     except ValueError:
         combo.addItem(data.label, userData=data)