mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #7881 (Tag Editor scroll bar resets to top after deleting a tag)
This commit is contained in:
commit
db7655001b
@ -105,9 +105,13 @@ class TagListEditor(QDialog, Ui_TagListEditor):
|
|||||||
if not question_dialog(self, _('Are your sure?'),
|
if not question_dialog(self, _('Are your sure?'),
|
||||||
'<p>'+_('Are you certain you want to delete the following items?')+'<br>'+ct):
|
'<p>'+_('Are you certain you want to delete the following items?')+'<br>'+ct):
|
||||||
return
|
return
|
||||||
|
row = self.available_tags.row(deletes[0])
|
||||||
for item in deletes:
|
for item in deletes:
|
||||||
(id,ign) = item.data(Qt.UserRole).toInt()
|
(id,ign) = item.data(Qt.UserRole).toInt()
|
||||||
self.to_delete.append(id)
|
self.to_delete.append(id)
|
||||||
self.available_tags.takeItem(self.available_tags.row(item))
|
self.available_tags.takeItem(self.available_tags.row(item))
|
||||||
|
|
||||||
|
if row >= self.available_tags.count():
|
||||||
|
row = self.available_tags.count() - 1
|
||||||
|
if row >= 0:
|
||||||
|
self.available_tags.scrollToItem(self.available_tags.item(row))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user