From 239095a2e353db8f9291084f31e79c92634d6fe3 Mon Sep 17 00:00:00 2001 From: Olivier Keshavjee Date: Sun, 31 May 2015 22:48:27 +0200 Subject: [PATCH] Adds userID and other stuff - correctly --- src/mainWindow.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/mainWindow.py b/src/mainWindow.py index b1175662..0adab77e 100644 --- a/src/mainWindow.py +++ b/src/mainWindow.py @@ -180,12 +180,11 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.mdlPersosInfos.takeColumn(i.row()+1) def changeCurrentPerso(self, trash=None): - for i in range(self.mdlPersosInfos.columnCount()): - idx = self.lstPersos.currentIndex() - pid = idx.sibling(idx.row(), 1) - pid2 = self.mdlPersosInfos.item(i, 0) - self.tblPersoInfos.setColumnHidden(i, i<>0 and pid <> pid2) - #self.tblPersoInfos.horizontalHeader().resizeSections(QHeaderView.Stretch) + idx = self.lstPersos.currentIndex() + pid = self.mdlPersos.item(idx.row(), 1).text() + for c in range(self.mdlPersosInfos.columnCount()): + pid2 = self.mdlPersosInfos.item(0, c).text() + self.tblPersoInfos.setColumnHidden(c, c <> 0 and pid <> pid2) self.resizePersosInfos()