Skip to content

Commit e778834

Browse files
committed
fix #315
1 parent 55ae74a commit e778834

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ui/textedit_commands.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,9 @@ def redo(self):
452452
blk.translation = trans_dict['replace']
453453
blk.rich_text = trans_dict['replace_html']
454454

455-
for src_dict in self.src_list:
456-
blk: TextBlock = self.proj.pages[trans_dict['pagename']][trans_dict['idx']]
457-
blk.text = trans_dict['replace']
455+
for src_dict in self.bsrc_list:
456+
blk: TextBlock = self.proj.pages[src_dict['pagename']][src_dict['idx']]
457+
blk.text = src_dict['replace']
458458

459459
def undo(self):
460460
for trans_dict in self.trans_list:
@@ -473,8 +473,8 @@ def undo(self):
473473
blk.rich_text = trans_dict['ori_html']
474474

475475
for src_dict in self.src_list:
476-
blk: TextBlock = self.proj.pages[trans_dict['pagename']][trans_dict['idx']]
477-
blk.text = trans_dict['ori']
476+
blk: TextBlock = self.proj.pages[src_dict['pagename']][src_dict['idx']]
477+
blk.text = src_dict['ori']
478478

479479

480480
class MultiPasteCommand(QUndoCommand):

0 commit comments

Comments
 (0)