Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1, 2.1.1, and 2.1.2

Merge with stable

Changeset 1a0b97b0a711

Parents 099d368ba54e

Parents d7fb556fa348

by Steve Borho

Changes to one file · Browse files at 1a0b97b0a711 Showing diff from parent 099d368ba54e d7fb556fa348 Diff from another changeset...

 
438
439
440
 
441
442
443
 
722
723
724
 
 
 
 
 
 
 
 
 
 
 
 
725
726
727
 
438
439
440
441
442
443
444
 
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
@@ -438,6 +438,7 @@
  self.setContextMenuPolicy(Qt.CustomContextMenu)   self.customContextMenuRequested.connect(self.menuRequested)   self.setTextElideMode(Qt.ElideLeft) + self.setItemDelegate(WctxItemDelegate())     def scrollTo(self, index, hint=QAbstractItemView.EnsureVisible):   # don't update horizontal position by selection change @@ -722,6 +723,18 @@
  def getChecked(self):   return self.checked.copy()   +class WctxItemDelegate(QItemDelegate): + '''Draw treeview checkboxes like standard QCheckBoxes''' + def drawCheck(self, painter, option, rect, state): + option.rect = rect + if state == Qt.Unchecked: + option.state |= QStyle.State_Off + elif state == Qt.Checked: + option.state |= QStyle.State_On + style = QApplication.style() + primitive = QStyle.PE_IndicatorCheckBox + return style.drawPrimitive(primitive, option, painter, None) +  def statusMessage(status, mst, upath):   tip = ''   if status in statusTypes: