Skip to content

"Back" button in Update window doesn’t close the update window #320

@liruobing60-alt

Description

@liruobing60-alt

Hi, I noticed a small UI issue with the Update student window.

When I open the Update window and click the “Back” button, the main window is shown again (which is correct), but the Update window is not closed. Instead, the code hides the View window:

def f6():
main_window.deiconify()
view_window.withdraw()

However, this function is used as the callback for the Update window’s Back button:

update_btn_back = Button(update_window, text="Back", width=10, font=f, command=f6)

So after clicking “Back”, both the main window and the Update window stay visible at the same time, which is confusing.

Expected behavior

Clicking the “Back” button in the Update window should:

Show the main window

Hide the Update window (not the View window)

Suggested fix

Replace view_window.withdraw() with update_window.withdraw():

def f6():
main_window.deiconify()
update_window.withdraw()

This way, the Back button works as expected for the Update window.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions