Commit 26cce6a0 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fix bug in GraphView with filtered vertices

This fixes a bug where the filters where not correctly copied from the
base graph.
parent 5ae329f1
......@@ -85,9 +85,6 @@ GraphInterface::GraphInterface(const GraphInterface& gi, bool keep_ref)
bind<void>(graph_copy(), _1, ref(_state->_mg),
gi._vertex_index, _vertex_index,
gi._edge_index, _edge_index))();
// graph_copy()(_state->_mg, gi._state->_mg, _vertex_index, gi._vertex_index,
// _edge_index, gi._edge_index);
// filters will be copied in python
......@@ -1544,10 +1544,19 @@ class GraphView(Graph):
self.__base = g if not isinstance(g, GraphView) else g.base
# copy graph reference
self._Graph__graph = libcore.GraphInterface(g._Graph__graph, True)
self._Graph__properties = g._Graph__properties
self._Graph__known_properties = g._Graph__known_properties
# set already existent filters
vf = g.get_vertex_filter()
if vf[0] is not None:
self.set_vertex_filter(vf[0], vf[1])
ef = g.get_edge_filter()
if ef[0] is not None:
self.set_edge_filter(ef[0], ef[1])
if vfilt is not None:
if type(vfilt) is PropertyMap:
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