Commit 405e8c87 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

GraphWidget: Fix problem with multilevel layouts

parent 8bf627bb
...@@ -312,8 +312,12 @@ class GraphWidget(Gtk.DrawingArea): ...@@ -312,8 +312,12 @@ class GraphWidget(Gtk.DrawingArea):
self.g = self.cg self.g = self.cg
self.pos = self.cpos self.pos = self.cpos
self.layout_step = self.layout_K self.layout_step = self.layout_K
self.selected = self.g.own_property(self.selected)
self.highlight = self.g.own_property(self.highlight)
self.sel_edge_filt = self.g.own_property(self.sel_edge_filt)
else: else:
self.cg = None self.cg = None
if update_layout: if update_layout:
self.reset_layout() self.reset_layout()
...@@ -421,6 +425,9 @@ class GraphWidget(Gtk.DrawingArea): ...@@ -421,6 +425,9 @@ class GraphWidget(Gtk.DrawingArea):
self.layout_K *= 0.75 self.layout_K *= 0.75
self.g = self.cg self.g = self.cg
self.pos = self.cpos self.pos = self.cpos
self.selected = self.g.own_property(self.selected)
self.highlight = self.g.own_property(self.highlight)
self.sel_edge_filt = self.g.own_property(self.sel_edge_filt)
self.layout_step = max(self.layout_K, self.layout_step = max(self.layout_K,
_avg_edge_distance(self.g, _avg_edge_distance(self.g,
self.pos) / 10) self.pos) / 10)
...@@ -436,6 +443,9 @@ class GraphWidget(Gtk.DrawingArea): ...@@ -436,6 +443,9 @@ class GraphWidget(Gtk.DrawingArea):
except StopIteration: except StopIteration:
self.g = self.ag self.g = self.ag
self.pos = self.apos self.pos = self.apos
self.selected = self.g.own_property(self.selected)
self.highlight = self.g.own_property(self.highlight)
self.sel_edge_filt = self.g.own_property(self.sel_edge_filt)
self.g.copy_property(self.cpos, self.pos) self.g.copy_property(self.cpos, self.pos)
if self.vertex_matrix is not None: if self.vertex_matrix is not None:
self.vertex_matrix = VertexMatrix(self.g, self.pos) self.vertex_matrix = VertexMatrix(self.g, self.pos)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment