Skip to content
Snippets Groups Projects
Commit d5bd683f authored by hagrid67's avatar hagrid67
Browse files

got editor mostly working with PILSVG

parent 313190c1
No related branches found
No related tags found
No related merge requests found
...@@ -174,10 +174,9 @@ class View(object): ...@@ -174,10 +174,9 @@ class View(object):
self.oRT = rt.RenderTool(self.editor.env, gl=self.sGL) self.oRT = rt.RenderTool(self.editor.env, gl=self.sGL)
def redraw(self): def redraw(self):
# TODO: bit of a hack - can we suppress the console messages from MPL at source?
# with redirect_stdout(stdout_dest):
with self.wOutput: with self.wOutput:
# plt.figure(figsize=(10, 10)) # plt.figure(figsize=(10, 10))
self.oRT.set_new_rail()
self.oRT.renderEnv(spacing=False, arrows=False, sRailColor="gray", self.oRT.renderEnv(spacing=False, arrows=False, sRailColor="gray",
show=False, iSelectedAgent=self.model.iSelectedAgent, show=False, iSelectedAgent=self.model.iSelectedAgent,
show_observations=self.show_observations()) show_observations=self.show_observations())
......
...@@ -758,7 +758,7 @@ class RenderTool(object): ...@@ -758,7 +758,7 @@ class RenderTool(object):
for iAgent, agent in enumerate(self.env.agents_static): for iAgent, agent in enumerate(self.env.agents_static):
if agent is None: if agent is None:
continue continue
dTargets[agent.target] = iAgent dTargets[tuple(agent.target)] = iAgent
# Draw each cell independently # Draw each cell independently
for r in range(env.height): for r in range(env.height):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment