From d80453c2a40d806c31ce1b53c531ef9dc1909777 Mon Sep 17 00:00:00 2001 From: hagrid67 <jdhwatson@gmail.com> Date: Tue, 28 May 2019 23:13:20 +0100 Subject: [PATCH] changed target to iTarget (meaning int index of target) to make all the subclasses of GraphicsLayer match --- flatland/utils/graphics_layer.py | 2 +- flatland/utils/render_qt.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flatland/utils/graphics_layer.py b/flatland/utils/graphics_layer.py index 1b2ff7ea..2598a889 100644 --- a/flatland/utils/graphics_layer.py +++ b/flatland/utils/graphics_layer.py @@ -66,7 +66,7 @@ class GraphicsLayer(object): def get_cmap(self, *args, **kwargs): return plt.get_cmap(*args, **kwargs) - def setRailAt(self, row, col, binTrans, target=None): + def setRailAt(self, row, col, binTrans, iTarget=None): """ Set the rail at cell (row, col) to have transitions binTrans. The target argument can contain the index of the agent to indicate that agent's target is at that cell, so that a station can be diff --git a/flatland/utils/render_qt.py b/flatland/utils/render_qt.py index ff8ebd12..dc2217c3 100644 --- a/flatland/utils/render_qt.py +++ b/flatland/utils/render_qt.py @@ -157,7 +157,7 @@ class QTSVG(GraphicsLayer): self.lwAgents = [] self.agents_prev = [] - def setRailAt(self, row, col, binTrans, target=None): + def setRailAt(self, row, col, binTrans, iTarget=None): if binTrans in self.track.dSvg: sSVG = self.track.dSvg[binTrans].to_string() svgWidget = create_QtSvgWidget_from_svg_string(sSVG) -- GitLab