Skip to content

Commit

Permalink
simplifying extra function using lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
RazinShaikh committed Jun 30, 2024
1 parent 802870b commit be24426
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions zxlive/rewrite_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def __init__(self, data: RewriteActionTree, proof_panel: ProofPanel) -> None:
self.proof_panel = proof_panel
self.root_item = data
self.emitter = SignalEmitter()
self.emitter.finished.connect(self.on_update_finished)
self.emitter.finished.connect(lambda: self.dataChanged.emit(QModelIndex(), QModelIndex(), []))
self.executor = ThreadPoolExecutor(max_workers=1)

@classmethod
Expand Down Expand Up @@ -227,6 +227,3 @@ def update_on_selection(self) -> None:
g = self.proof_panel.graph_scene.g
self.root_item.update_on_selection(g, selection, edges)
QMetaObject.invokeMethod(self.emitter, "finished", Qt.QueuedConnection)

def on_update_finished(self) -> None:
self.dataChanged.emit(QModelIndex(), QModelIndex(), [])

0 comments on commit be24426

Please sign in to comment.