Skip to content

Commit

Permalink
fix #315
Browse files Browse the repository at this point in the history
  • Loading branch information
dmMaze committed Nov 29, 2023
1 parent 55ae74a commit e778834
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ui/textedit_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,9 @@ def redo(self):
blk.translation = trans_dict['replace']
blk.rich_text = trans_dict['replace_html']

for src_dict in self.src_list:
blk: TextBlock = self.proj.pages[trans_dict['pagename']][trans_dict['idx']]
blk.text = trans_dict['replace']
for src_dict in self.bsrc_list:
blk: TextBlock = self.proj.pages[src_dict['pagename']][src_dict['idx']]
blk.text = src_dict['replace']

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

for src_dict in self.src_list:
blk: TextBlock = self.proj.pages[trans_dict['pagename']][trans_dict['idx']]
blk.text = trans_dict['ori']
blk: TextBlock = self.proj.pages[src_dict['pagename']][src_dict['idx']]
blk.text = src_dict['ori']


class MultiPasteCommand(QUndoCommand):
Expand Down

0 comments on commit e778834

Please sign in to comment.