Skip to content

Commit

Permalink
Merge branch 'master' into save_rule_or_proof
Browse files Browse the repository at this point in the history
  • Loading branch information
dlyongemallo committed Nov 20, 2023
2 parents 35e104b + e27b098 commit f4094d5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion zxlive/proof_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,6 @@ def _refresh_rewrites_model(self) -> None:
self.rewrites_panel.clicked.connect(model.do_rewrite)
# TODO: Right now this calls for every single vertex selected, even if we select many at the same time
self.graph_scene.selectionChanged.connect(model.update_on_selection)
self.rewrites_panel.expandAll()


class ProofStepItemDelegate(QStyledItemDelegate):
Expand Down
1 change: 1 addition & 0 deletions zxlive/rewrite_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ def _extract_circuit(graph: GraphT, matches: list) -> GraphT:

action_groups = {
"Basic rules": {key: operations[key] for key in rules_basic},
"Custom rules": {},
"Graph-like rules": rewrites_graph_theoretic,
"ZXW rules": {key: operations[key] for key in rules_zxw},
"ZH rules": {key: operations[key] for key in rules_zh},
Expand Down
8 changes: 3 additions & 5 deletions zxlive/tikz.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@

def proof_to_tikz(proof: ProofModel) -> str:
settings = QSettings("zxlive", "zxlive")
vspace = settings.value("tikz/layout/vspace")
hspace = settings.value("tikz/layout/hspace")
max_width = settings.value("tikz/layout/max-width")
vspace = float(settings.value("tikz/layout/vspace"))
hspace = float(settings.value("tikz/layout/hspace"))
max_width = float(settings.value("tikz/layout/max-width"))
draw_scalar = False

assert isinstance(vspace, float) and isinstance(hspace, float) and isinstance(max_width, float)

xoffset = -max_width
yoffset = -10
idoffset = 0
Expand Down

0 comments on commit f4094d5

Please sign in to comment.