Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Flatland
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sfwatergit
Flatland
Commits
d80453c2
Commit
d80453c2
authored
5 years ago
by
hagrid67
Browse files
Options
Downloads
Patches
Plain Diff
changed target to iTarget (meaning int index of target)
to make all the subclasses of GraphicsLayer match
parent
ecf84f78
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
flatland/utils/graphics_layer.py
+1
-1
1 addition, 1 deletion
flatland/utils/graphics_layer.py
flatland/utils/render_qt.py
+1
-1
1 addition, 1 deletion
flatland/utils/render_qt.py
with
2 additions
and
2 deletions
flatland/utils/graphics_layer.py
+
1
−
1
View file @
d80453c2
...
@@ -66,7 +66,7 @@ class GraphicsLayer(object):
...
@@ -66,7 +66,7 @@ class GraphicsLayer(object):
def
get_cmap
(
self
,
*
args
,
**
kwargs
):
def
get_cmap
(
self
,
*
args
,
**
kwargs
):
return
plt
.
get_cmap
(
*
args
,
**
kwargs
)
return
plt
.
get_cmap
(
*
args
,
**
kwargs
)
def
setRailAt
(
self
,
row
,
col
,
binTrans
,
t
arget
=
None
):
def
setRailAt
(
self
,
row
,
col
,
binTrans
,
iT
arget
=
None
):
"""
Set the rail at cell (row, col) to have transitions binTrans.
"""
Set the rail at cell (row, col) to have transitions binTrans.
The target argument can contain the index of the agent to indicate
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
that agent
'
s target is at that cell, so that a station can be
...
...
This diff is collapsed.
Click to expand it.
flatland/utils/render_qt.py
+
1
−
1
View file @
d80453c2
...
@@ -157,7 +157,7 @@ class QTSVG(GraphicsLayer):
...
@@ -157,7 +157,7 @@ class QTSVG(GraphicsLayer):
self
.
lwAgents
=
[]
self
.
lwAgents
=
[]
self
.
agents_prev
=
[]
self
.
agents_prev
=
[]
def
setRailAt
(
self
,
row
,
col
,
binTrans
,
t
arget
=
None
):
def
setRailAt
(
self
,
row
,
col
,
binTrans
,
iT
arget
=
None
):
if
binTrans
in
self
.
track
.
dSvg
:
if
binTrans
in
self
.
track
.
dSvg
:
sSVG
=
self
.
track
.
dSvg
[
binTrans
].
to_string
()
sSVG
=
self
.
track
.
dSvg
[
binTrans
].
to_string
()
svgWidget
=
create_QtSvgWidget_from_svg_string
(
sSVG
)
svgWidget
=
create_QtSvgWidget_from_svg_string
(
sSVG
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment