mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Keep position when deleting tags in the tag editor
Fixes #1226093 [[Enhancement] Tag editor should remember place](https://bugs.launchpad.net/calibre/+bug/1226093)
This commit is contained in:
parent
7c101e4e09
commit
fe26aea85a
@ -69,6 +69,7 @@ class TagEditor(QDialog, Ui_TagEditor):
|
||||
if not items:
|
||||
error_dialog(self, 'No tags selected', 'You must select at least one tag from the list of Available tags.').exec_()
|
||||
return
|
||||
pos = self.available_tags.verticalScrollBar().value()
|
||||
for item in items:
|
||||
used = self.db.is_tag_used(unicode(item.text())) \
|
||||
if self.key is None else \
|
||||
@ -92,6 +93,7 @@ class TagEditor(QDialog, Ui_TagEditor):
|
||||
label=self.key)
|
||||
self.db.refresh_ids(bks)
|
||||
self.available_tags.takeItem(self.available_tags.row(item))
|
||||
self.available_tags.verticalScrollBar().setValue(pos)
|
||||
|
||||
def apply_tags(self, item=None):
|
||||
items = self.available_tags.selectedItems() if item is None else [item]
|
||||
|
Loading…
x
Reference in New Issue
Block a user