Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5e5b51c

Browse files
thesagarsehgalantmarakis
authored andcommitted
closing the old cell window (aimacode#996)
1 parent fb57e95 commit 5e5b51c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gui/grid_mdp.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
green8 = '#008080'
4242
green4 = '#004040'
4343

44+
cell_window_mantainer=None
4445

4546
def extents(f):
4647
''' adjusts axis markers for heatmap '''
@@ -251,7 +252,12 @@ def initialize_widget_disability_checks(_width, _height, gridmdp, terminals, lab
251252
def dialogbox(i, j, gridmdp, terminals, buttons, _height):
252253
''' creates dialogbox for each cell '''
253254

255+
global cell_window_mantainer
256+
if(cell_window_mantainer!=None):
257+
cell_window_mantainer.destroy()
258+
254259
dialog = tk.Toplevel()
260+
cell_window_mantainer=dialog
255261
dialog.wm_title(f'{_height - i - 1}, {j}')
256262

257263
container = tk.Frame(dialog)

0 commit comments

Comments
 (0)