mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1514 (return from convert screen)
This commit is contained in:
parent
2946ba6268
commit
57c8df9d68
@ -1046,6 +1046,8 @@ class Main(MainWindow, Ui_MainWindow):
|
|||||||
def convert_single(self, checked):
|
def convert_single(self, checked):
|
||||||
r = self.get_books_for_conversion()
|
r = self.get_books_for_conversion()
|
||||||
if r is None: return
|
if r is None: return
|
||||||
|
previous = self.library_view.currentIndex()
|
||||||
|
rows = [x.row() for x in self.library_view.selectionModel().selectedRows()]
|
||||||
comics, others = r
|
comics, others = r
|
||||||
jobs, changed = convert_single_ebook(self, self.library_view.model().db, comics, others)
|
jobs, changed = convert_single_ebook(self, self.library_view.model().db, comics, others)
|
||||||
for func, args, desc, fmt, id, temp_files in jobs:
|
for func, args, desc, fmt, id, temp_files in jobs:
|
||||||
@ -1054,8 +1056,9 @@ class Main(MainWindow, Ui_MainWindow):
|
|||||||
self.conversion_jobs[job] = (temp_files, fmt, id)
|
self.conversion_jobs[job] = (temp_files, fmt, id)
|
||||||
|
|
||||||
if changed:
|
if changed:
|
||||||
self.library_view.model().resort(reset=False)
|
self.library_view.model().refresh_rows(rows)
|
||||||
self.library_view.model().research()
|
current = self.library_view.currentIndex()
|
||||||
|
self.library_view.model().current_changed(current, previous)
|
||||||
|
|
||||||
def book_converted(self, job):
|
def book_converted(self, job):
|
||||||
temp_files, fmt, book_id = self.conversion_jobs.pop(job)
|
temp_files, fmt, book_id = self.conversion_jobs.pop(job)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user