Adds userID and other stuff - correctly

This commit is contained in:
Olivier Keshavjee 2015-05-31 22:48:27 +02:00
parent 07b17ab2e9
commit 239095a2e3

View file

@ -180,12 +180,11 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.mdlPersosInfos.takeColumn(i.row()+1) self.mdlPersosInfos.takeColumn(i.row()+1)
def changeCurrentPerso(self, trash=None): def changeCurrentPerso(self, trash=None):
for i in range(self.mdlPersosInfos.columnCount()): idx = self.lstPersos.currentIndex()
idx = self.lstPersos.currentIndex() pid = self.mdlPersos.item(idx.row(), 1).text()
pid = idx.sibling(idx.row(), 1) for c in range(self.mdlPersosInfos.columnCount()):
pid2 = self.mdlPersosInfos.item(i, 0) pid2 = self.mdlPersosInfos.item(0, c).text()
self.tblPersoInfos.setColumnHidden(i, i<>0 and pid <> pid2) self.tblPersoInfos.setColumnHidden(c, c <> 0 and pid <> pid2)
#self.tblPersoInfos.horizontalHeader().resizeSections(QHeaderView.Stretch)
self.resizePersosInfos() self.resizePersosInfos()