mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Remember current tab when using apply in bulk edit
This commit is contained in:
parent
c7bb32dc40
commit
4bf7bc6b7b
@ -164,12 +164,15 @@ class EditMetadataAction(InterfaceAction):
|
||||
self.gui.tags_view.blockSignals(True)
|
||||
changed = False
|
||||
try:
|
||||
current_tab = 0
|
||||
while True:
|
||||
dialog = MetadataBulkDialog(self.gui, rows, self.gui.library_view.model())
|
||||
dialog = MetadataBulkDialog(self.gui, rows,
|
||||
self.gui.library_view.model(), current_tab)
|
||||
if dialog.changed:
|
||||
changed = True
|
||||
if not dialog.do_again:
|
||||
break
|
||||
current_tab = dialog.central_widget.currentIndex()
|
||||
finally:
|
||||
self.gui.tags_view.blockSignals(False)
|
||||
if changed:
|
||||
|
@ -197,7 +197,7 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
||||
_('Append to field'),
|
||||
]
|
||||
|
||||
def __init__(self, window, rows, model):
|
||||
def __init__(self, window, rows, model, tab):
|
||||
QDialog.__init__(self, window)
|
||||
Ui_MetadataBulkDialog.__init__(self)
|
||||
self.setupUi(self)
|
||||
@ -238,6 +238,7 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
||||
'Immediately make all changes without closing the dialog. '
|
||||
'This operation cannot be canceled or undone'))
|
||||
self.do_again = False
|
||||
self.central_widget.setCurrentIndex(tab)
|
||||
self.exec_()
|
||||
|
||||
def button_clicked(self, which):
|
||||
|
Loading…
x
Reference in New Issue
Block a user