mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
viewer: handle recently opened list when started without a book
When starting ebook-viewer standalone without a book, set_book_path has never been called and there is no pathtoebook attribute yet. In this case, we certainly don't need to compare it to the current book.
This commit is contained in:
parent
1e742f711f
commit
e3d073589b
@ -250,7 +250,7 @@ class ActionsToolBar(ToolBar):
|
|||||||
path = os.path.abspath(entry['pathtoebook'])
|
path = os.path.abspath(entry['pathtoebook'])
|
||||||
except Exception:
|
except Exception:
|
||||||
continue
|
continue
|
||||||
if path == os.path.abspath(set_book_path.pathtoebook):
|
if hasattr(set_book_path, 'pathtoebook') and path == os.path.abspath(set_book_path.pathtoebook):
|
||||||
continue
|
continue
|
||||||
m.addAction('{}\t {}'.format(
|
m.addAction('{}\t {}'.format(
|
||||||
elided_text(entry['title'], pos='right', width=250),
|
elided_text(entry['title'], pos='right', width=250),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user