From 56c5979b72536ccf64bcb6a87dc2319afebe28e4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 19 Jun 2011 17:12:39 -0600 Subject: [PATCH] Fix #799393 (Jobs window has no selection when first opened) --- src/calibre/gui2/jobs.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/gui2/jobs.py b/src/calibre/gui2/jobs.py index 20154a298b..589b28d520 100644 --- a/src/calibre/gui2/jobs.py +++ b/src/calibre/gui2/jobs.py @@ -432,6 +432,10 @@ class JobsDialog(QDialog, Ui_JobsDialog): self.jobs_view.horizontalHeader().restoreState(QByteArray(state)) except: pass + idx = self.jobs_view.model().index(0, 0) + if idx.isValid(): + sm = self.jobs_view.selectionModel() + sm.select(idx, sm.ClearAndSelect|sm.Rows) def save_state(self): try: