mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Enhancement #7881 - keep manage tags editor positioned near last delete.
This commit is contained in:
parent
d80ae09ce8
commit
ae8764d456
@ -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