def draw_network(self, nodes, links):
app = QApplication.instance()
logger = logging.getLogger()
# we are plotting wholesale. So, disable signals temporily
with u.updates_disabled_temporarily(self.get_plot()):
if(nodes):
logger.info("Drawing nodes")
app.processEvents()
self.draw_nodes(nodes)
# we don't want users to select grid, or nodes and they should not appear in the item list.
# So lock'em up.
self.set_all_private()
if(links):
logger.info("Drawing links")
app.processEvents()
self.draw_links(links)
self.get_plot().do_autoscale(replot=True)
评论列表
文章目录