Skip to content

Commit

Permalink
fixed no-updating bug
Browse files Browse the repository at this point in the history
  • Loading branch information
akissinger committed May 24, 2023
1 parent 6b7c257 commit ec0eabc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions chyp/gui/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,11 @@ def next_rewrite_at_cursor(self) -> None:
cursor.setPosition(start)
cursor.setPosition(end, mode=QTextCursor.MoveMode.KeepAnchor)

self.blockSignals(True)
# self.blockSignals(True)
cursor.insertText(rw_term)
self.code_view.setTextCursor(cursor)
self.blockSignals(False)
self.update_state()
# self.blockSignals(False)
# self.update_state()

def repeat_step_at_cursor(self) -> None:
self.update_state()
Expand Down
8 changes: 4 additions & 4 deletions examples/interacting_s_hopf.chyp
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ let d_inv = id * cup2 ; cap1 * id

rewrite d_d_inv :
d ; d_inv
= cup1 * id ; sw[1, 2, 0] ; d_inv * cap2 by d_def
= cup2 * id ; sw[2, 0, 1] ; cap2 * id by F1.yankL
= cup2 * cup1 * id ; sw[1, 3, 0, 4, 2] ; id * cap1 * cap2 by d_def
= id * cup2 ; cap2 * id by F1.yankL
= id by F2.yankR

rewrite d_inv_d :
d_inv ; d
= d_inv * cup1 ; cap2 * id by d_def
= cup1 * id ; sw[2, 0, 1] ; cap1 * id by F2.yankL
= cup2 * id * cup1 ; sw[1, 3, 2, 0] * id ; cap2 * cap1 * id by d_def
= id * cup1 ; cap1 * id by F2.yankL
= id by F1.yankR

# The dualiser preserves (co)units
Expand Down

0 comments on commit ec0eabc

Please sign in to comment.