Skip to content

Commit

Permalink
Merge pull request #305 from zickgraf/master
Browse files Browse the repository at this point in the history
Detect inputs and outputs before saving as JSON
  • Loading branch information
RazinShaikh authored Jul 11, 2024
2 parents b48549f + b9e89d0 commit b16e727
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions zxlive/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ def save_diagram_dialog(graph: GraphT, parent: QWidget) -> Optional[tuple[str, F
file_path, selected_format = file_path_and_format

if selected_format in (FileFormat.QGraph, FileFormat.Json):
try:
graph.auto_detect_io()
except TypeError:
pass
data = graph.to_json()
elif selected_format == FileFormat.QASM:
try:
Expand Down

0 comments on commit b16e727

Please sign in to comment.