Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX:The application terminates if you cancel the confirmation dialog box for exit. #875

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AksharaSBhat
Copy link

This fixes the issue #874 .

Changes in ExitDialog

1. Added a on_close function:

This function handles the close event of the dialog.

It calls EndModal with wx.ID_CANCEL to set the return code when the dialog is closed without selecting an option

2. Bound the EVT_CLOSE event:

The EVT_CLOSE event is bound to the on_close function.

3. Checked the return value of wx.ID_CANCEL:

The return value wx.ID_CANCEL is checked to determine if the dialog was closed without selecting an option.

If wx.ID_CANCEL is returned, the function returns 0 to prevent the application from exiting.

@HossamSaberX
Copy link
Contributor

Greetings!
May i know how did you manage to traverse the codebase to spot the issue's code lines?

@AksharaSBhat
Copy link
Author

I identified the the relevant modules/files by going through them and getting a rough idea of what they were doing. Then I searched for key words like dialog box, close, Yes, answer to narrow down on the code that was responsible for this.

Menu items from menu bar will disappear when the window is minimised.
Uses the evt_iconize to detect minimising the window and simulates a mouse click to disappear it.
@AksharaSBhat
Copy link
Author

I am sorry for committing the fixes for another issue on this branch, I have reverted those commits now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants