Ask to save changes even after pressing "Cancel"

When pressing "Cancel" in Cvpcb's Footprint Assignment window, Cvpcb
discards changes without prompting the user. The comment suggests that
this behavior is intentional.

I have personally lost work due to this behavior when I tried to click
"Ok" and missed. Discarding changes without a prompt seems like a bad
idea anyway, so this stop doing that.

The only disadvantage is that it is now harder to open and close the
Footprint Assignment window without saving changes.
This commit is contained in:
Kevin Zheng 2019-12-29 18:47:18 +08:00 committed by Seth Hillbrand
parent 070c6b8ce0
commit af514cac44
1 changed files with 0 additions and 2 deletions

View File

@ -264,8 +264,6 @@ void CVPCB_MAINFRAME::setupEventHandlers()
Bind( wxEVT_BUTTON, Bind( wxEVT_BUTTON,
[this]( wxCommandEvent& ) [this]( wxCommandEvent& )
{ {
// Throw away modifications on a Cancel
m_modified = false;
Close( false ); Close( false );
}, wxID_CANCEL ); }, wxID_CANCEL );