def DeleteColumnMixin(self, col):
'''Replaces ListCtrl DeleteColumn to keep the ascending/descending sort flags
sync'ed with column insertion
The reason to do this: if put on the right hand side of the "base
classes" list a plain InsertColumn method would not be found and Mixins
are usually put on the right hand side
'''
deleted = self.DeleteColumnOrig(col)
if deleted:
self.sortflags.pop(col)
if self.col == col:
# Last sorted column ... removed ... invalidate index
self.col = -1
elif self.col > col:
# Keep the index sync'ed, since we removed from the left
self.col -= 1
评论列表
文章目录