From 44ca257bae3d9bd38c46eb9990517708319067bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Schreiner?= Date: Sat, 24 Mar 2012 20:29:41 +0100 Subject: [PATCH] Add revisions at the end and not the beginning. Revisions are now shown in the correct order. --- weboob/applications/qwebcontentedit/main_window.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/weboob/applications/qwebcontentedit/main_window.py b/weboob/applications/qwebcontentedit/main_window.py index f8dd2b6e..caa4a3db 100644 --- a/weboob/applications/qwebcontentedit/main_window.py +++ b/weboob/applications/qwebcontentedit/main_window.py @@ -181,7 +181,7 @@ class MainWindow(QtMainWindow): return # we set the flags to Qt.ItemIsEnabled so that the items - # are not modifiable + # are not modifiable (they are modifiable by default) item_revision = QTableWidgetItem(revision.revision) item_revision.setFlags(Qt.ItemIsEnabled) @@ -193,10 +193,12 @@ class MainWindow(QtMainWindow): item_summary = QTableWidgetItem(revision.comment) item_summary.setFlags(Qt.ItemIsEnabled) - + row = self.ui.historyTable.currentRow() + 1 self.ui.historyTable.insertRow(row) self.ui.historyTable.setItem(row, 0, item_revision) self.ui.historyTable.setItem(row, 1, item_time) self.ui.historyTable.setItem(row, 2, item_author) self.ui.historyTable.setItem(row, 3, item_summary) + + self.ui.historyTable.setCurrentCell(row, 0)