8000 Fix not being able to close current tab as per issue #27. · georgecms/complete-python-course@36955a3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 36955a3

Browse files
committed
Fix not being able to close current tab as per issue tecladocode#27.
1 parent f5a493a commit 36955a3

File tree

1 file changed

+3
-1
lines changed
  • course_contents/19_gui_development_tkinter/lectures/17_adding_permanent_scrollbar

1 file changed

+3
-1
lines changed

course_contents/19_gui_development_tkinter/lectures/17_adding_permanent_scrollbar/app.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ def get_current_tab():
3030
def close_current_tab():
3131
if current_tab_unsaved() and not confirm_close():
3232
return
33+
34+
current_tab = get_current_tab()
3335

3436
if len(notebook.tabs()) == 1:
3537
create_file()
3638

37-
notebook.forget(get_current_tab())
39+
notebook.forget(current_tab)
3840

3941

4042
def current_tab_unsaved():

0 commit comments

Comments
 (0)
0