From b3e77bac61060055de3e16208bce47335f1541d7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 14 Dec 2010 14:49:49 -0700 Subject: [PATCH] Fix #7890 (Drag/drop of new cover to book detail panel does not update cover browser) --- src/calibre/gui2/actions/add.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/calibre/gui2/actions/add.py b/src/calibre/gui2/actions/add.py index 014fa573d2..38c28661b7 100644 --- a/src/calibre/gui2/actions/add.py +++ b/src/calibre/gui2/actions/add.py @@ -120,6 +120,7 @@ class AddAction(InterfaceAction): if self.gui.current_view() is not self.gui.library_view: return db = self.gui.library_view.model().db + cover_changed = False current_idx = self.gui.library_view.currentIndex() if not current_idx.isValid(): return cid = db.id(current_idx.row()) @@ -133,12 +134,16 @@ class AddAction(InterfaceAction): if not pmap.isNull(): accept = True db.set_cover(cid, pmap) + cover_changed = True elif ext in BOOK_EXTENSIONS: db.add_format_with_hooks(cid, ext, path, index_is_id=True) accept = True if accept: event.accept() self.gui.library_view.model().current_changed(current_idx, current_idx) + if cover_changed: + if self.gui.cover_flow: + self.gui.cover_flow.dataChanged() def __add_filesystem_book(self, paths, allow_device=True): if isinstance(paths, basestring):