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)

This commit is contained in:
Kovid Goyal 2019-12-01 14:09:41 +05:30
parent 0abd0d88ee
commit ccce39da50
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -276,7 +276,7 @@ class BookmarkManager(QWidget):
break break
title, ok = QInputDialog.getText(self, _('Add bookmark'), 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() title = unicode_type(title).strip()
if not ok or not title: if not ok or not title:
return return