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
yoogottamk
Flatland
Commits
39de57c1
Commit
39de57c1
authored
5 years ago
by
Egli Adrian (IT-SCI-API-PFI)
Browse files
Options
Downloads
Patches
Plain Diff
Bug fiex: root = tk.TK() must be destroyied as well
parent
6f098694
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
flatland/utils/graphics_pil.py
+6
-3
6 additions, 3 deletions
flatland/utils/graphics_pil.py
with
6 additions
and
3 deletions
flatland/utils/graphics_pil.py
+
6
−
3
View file @
39de57c1
...
@@ -75,6 +75,7 @@ class PILGL(GraphicsLayer):
...
@@ -75,6 +75,7 @@ class PILGL(GraphicsLayer):
self
.
ltAgentColors
=
[
self
.
rgb_s2i
(
sColor
)
for
sColor
in
sColors
.
split
(
"
#
"
)]
self
.
ltAgentColors
=
[
self
.
rgb_s2i
(
sColor
)
for
sColor
in
sColors
.
split
(
"
#
"
)]
self
.
nAgentColors
=
len
(
self
.
ltAgentColors
)
self
.
nAgentColors
=
len
(
self
.
ltAgentColors
)
self
.
window_root
=
None
self
.
window_open
=
False
self
.
window_open
=
False
self
.
firstFrame
=
True
self
.
firstFrame
=
True
self
.
create_layers
()
self
.
create_layers
()
...
@@ -131,9 +132,9 @@ class PILGL(GraphicsLayer):
...
@@ -131,9 +132,9 @@ class PILGL(GraphicsLayer):
assert
self
.
window_open
is
False
,
"
Window is already open!
"
assert
self
.
window_open
is
False
,
"
Window is already open!
"
# use tk.Toplevel() instead of tk.Tk()
# use tk.Toplevel() instead of tk.Tk()
# https://stackoverflow.com/questions/26097811/image-pyimage2-doesnt-exist
# https://stackoverflow.com/questions/26097811/image-pyimage2-doesnt-exist
root
=
tk
.
Tk
()
self
.
window_
root
=
tk
.
Tk
()
root
.
withdraw
()
self
.
window_
root
.
withdraw
()
self
.
window
=
tk
.
Toplevel
(
root
)
self
.
window
=
tk
.
Toplevel
(
self
.
window_
root
)
self
.
window
.
title
(
"
Flatland
"
)
self
.
window
.
title
(
"
Flatland
"
)
self
.
window
.
configure
(
background
=
'
grey
'
)
self
.
window
.
configure
(
background
=
'
grey
'
)
self
.
window_open
=
True
self
.
window_open
=
True
...
@@ -142,6 +143,8 @@ class PILGL(GraphicsLayer):
...
@@ -142,6 +143,8 @@ class PILGL(GraphicsLayer):
self
.
panel
.
destroy
()
self
.
panel
.
destroy
()
self
.
window
.
quit
()
self
.
window
.
quit
()
self
.
window
.
destroy
()
self
.
window
.
destroy
()
self
.
window_root
.
destroy
()
self
.
window
=
None
def
text
(
self
,
*
args
,
**
kwargs
):
def
text
(
self
,
*
args
,
**
kwargs
):
pass
pass
...
...
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