From ccce39da50edef2eb57b0420ca3fa756a82eac2f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 1 Dec 2019 14:09:41 +0530 Subject: [PATCH] Viewer: When creating a new bookmark ifthere is selected text use it as the default bookmark title. Fixes #1854611 [Feature request: Highlighter and Bookmark](https://bugs.launchpad.net/calibre/+bug/1854611) --- src/calibre/gui2/viewer/bookmarks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/viewer/bookmarks.py b/src/calibre/gui2/viewer/bookmarks.py index a99d6f7dc7..57121f015a 100644 --- a/src/calibre/gui2/viewer/bookmarks.py +++ b/src/calibre/gui2/viewer/bookmarks.py @@ -276,7 +276,7 @@ class BookmarkManager(QWidget): break title, ok = QInputDialog.getText(self, _('Add bookmark'), - _('Enter title for bookmark:'), text=default_title) + _('Enter title for bookmark:'), text=pos_data.get('selected_text') or default_title) title = unicode_type(title).strip() if not ok or not title: return