mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix OPF not being updated when batching renames
This commit is contained in:
parent
b45c387260
commit
26b17f7efe
@ -286,12 +286,14 @@ class FileList(QTreeWidget, OpenWithHandler):
|
||||
self.itemActivated.connect(self.item_double_clicked)
|
||||
|
||||
def possible_rename_requested(self, index, old, new):
|
||||
if old != new:
|
||||
self.pending_renames[old] = new
|
||||
QTimer.singleShot(10, self.dispatch_pending_renames)
|
||||
item = self.itemFromIndex(index)
|
||||
item.setText(0, new)
|
||||
|
||||
def dispatch_pending_renames(self):
|
||||
if self.pending_renames:
|
||||
if self.state() != QAbstractItemView.State.EditingState:
|
||||
pr, self.pending_renames = self.pending_renames, {}
|
||||
if len(pr) == 1:
|
||||
|
Loading…
x
Reference in New Issue
Block a user