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)
|
self.gui.tags_view.blockSignals(True)
|
||||||
changed = False
|
changed = False
|
||||||
try:
|
try:
|
||||||
|
current_tab = 0
|
||||||
while True:
|
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:
|
if dialog.changed:
|
||||||
changed = True
|
changed = True
|
||||||
if not dialog.do_again:
|
if not dialog.do_again:
|
||||||
break
|
break
|
||||||
|
current_tab = dialog.central_widget.currentIndex()
|
||||||
finally:
|
finally:
|
||||||
self.gui.tags_view.blockSignals(False)
|
self.gui.tags_view.blockSignals(False)
|
||||||
if changed:
|
if changed:
|
||||||
|
@ -197,7 +197,7 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
|||||||
_('Append to field'),
|
_('Append to field'),
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, window, rows, model):
|
def __init__(self, window, rows, model, tab):
|
||||||
QDialog.__init__(self, window)
|
QDialog.__init__(self, window)
|
||||||
Ui_MetadataBulkDialog.__init__(self)
|
Ui_MetadataBulkDialog.__init__(self)
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
@ -238,6 +238,7 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
|||||||
'Immediately make all changes without closing the dialog. '
|
'Immediately make all changes without closing the dialog. '
|
||||||
'This operation cannot be canceled or undone'))
|
'This operation cannot be canceled or undone'))
|
||||||
self.do_again = False
|
self.do_again = False
|
||||||
|
self.central_widget.setCurrentIndex(tab)
|
||||||
self.exec_()
|
self.exec_()
|
||||||
|
|
||||||
def button_clicked(self, which):
|
def button_clicked(self, which):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user