Commit 28fee35d authored by Tiago Peixoto's avatar Tiago Peixoto

graph_draw(): Avoid drawing selected vertices, when none exist

This fixes issue #551
parent 55355c90
Pipeline #479 failed with stage
in 177 minutes and 34 seconds
......@@ -22,9 +22,9 @@ from __future__ import division, absolute_import, print_function
import numpy
from .. import GraphView, PropertyMap, ungroup_vector_property,\
group_vector_property, infect_vertex_property, edge_endpoint_property, \
_prop
from .. import GraphView, PropertyMap, VertexPropertyMap, \
ungroup_vector_property, group_vector_property, infect_vertex_property, \
edge_endpoint_property, _prop
from .cairo_draw import *
from .cairo_draw import _vdefaults, _edefaults
from .. draw import sfdp_layout, random_layout, _avg_edge_distance, \
......@@ -576,7 +576,7 @@ class GraphWidget(Gtk.DrawingArea):
cr.paint()
cr.restore()
if self.picked is not None or self.picked is not False:
if self.selected.fa.sum() > 0:
# draw immediate neighborhood
if self.selected.fa.sum() == 1:
vprops = dict(**self.vprops)
......
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