Skip to content

Commit

Permalink
use SVGViewer for connections with networkx==2
Browse files Browse the repository at this point in the history
Signed-off-by: Christian López Barrón <chris.gfz@gmail.com>
  • Loading branch information
chrizzFTD committed Dec 9, 2024
1 parent e3f9167 commit 4bf2936
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion grill/views/description.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,10 @@ def _nx_graph_edge_filter(*, has_specs=None, ancestral=None, implicit=None, intr
class _ConnectableAPIViewer(QtWidgets.QDialog):
def __init__(self, parent=None, **kwargs):
super().__init__(parent=parent, **kwargs)
self._graph_view = _graph._GraphViewer(parent=self)
if nx.__version__.startswith("2"):
self._graph_view = _graph._GraphSVGViewer(parent=self)
else:
self._graph_view = _graph._GraphViewer(parent=self)
vertical = QtWidgets.QSplitter(QtCore.Qt.Vertical)
vertical.addWidget(self._graph_view)
self.setFocusProxy(self._graph_view)
Expand Down

0 comments on commit 4bf2936

Please sign in to comment.