Ejemplo n.º 1
0
 def selectionChanged(self, *args):
     sel = self.selectedItems()
     if len(sel) != 1:
         sel = None
     if self.lastSel is not None:
         self.lastSel.selected(False)
     if sel is None:
         self.lastSel = None
         return
     self.lastSel = sel[0]
     if hasattr(sel[0], 'selected'):
         sel[0].selected(True)
     return TreeWidget.selectionChanged(self, *args)
Ejemplo n.º 2
0
 def selectionChanged(self, *args):
     sel = self.selectedItems()
     if len(sel) != 1:
         sel = None
     if self.lastSel is not None:
         self.lastSel.selected(False)
     if sel is None:
         self.lastSel = None
         return
     self.lastSel = sel[0]
     if hasattr(sel[0], 'selected'):
         sel[0].selected(True)
     return TreeWidget.selectionChanged(self, *args)