Skip to content

Commit

Permalink
Merge pull request #160 from dlyongemallo/matrix_parameter_error
Browse files Browse the repository at this point in the history
Show error message if `show_matrix` is called on parametrized diagram.
  • Loading branch information
jvdwetering authored Oct 31, 2023
2 parents 1f6f5e9 + 0d3f56e commit 9115e56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion zxlive/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,13 @@ def format_str(c: complex) -> str:
if self.active_panel is None: return
try:
self.active_panel.graph.auto_detect_io()
matrix = self.active_panel.graph.to_matrix()
except AttributeError:
show_error_msg("Can't show matrix", "Showing matrices for parametrized diagrams is not supported yet.")
return
except Exception as e:
show_error_msg("Can't show matrix", str(e))
return
matrix = self.active_panel.graph.to_matrix()
dialog = QDialog()
dialog.setWindowTitle("Matrix")
table = QTableWidget()
Expand Down

0 comments on commit 9115e56

Please sign in to comment.