Commit 31062410 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Change GraphView.get_parent() to GraphView.base

Now GraphView.base points to the underlying, unfiltered, base graph,
even if "g" is another GraphView instance.
parent 6e3cc364
......@@ -1473,7 +1473,7 @@ class GraphView(Graph):
self._Graph__graph = libcore.GraphInterface(g._Graph__graph, True)
self._Graph__properties = g._Graph__properties
self._Graph__known_properties = g._Graph__known_properties
self.__parent = g
self.__base = g if type(g) is not GraphView else g.base
if vfilt is not None:
if type(vfilt) is PropertyMap:
......@@ -1510,6 +1510,6 @@ class GraphView(Graph):
if reversed:
self.set_reversed(not g.is_reversed())
def get_parent(self):
"Return parent graph."
return self.__parent
def __get_base(self):
return self.__base
base = property(__get_base, doc="Base graph.")
Supports Markdown
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