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:
parent
070c6b8ce0
commit
af514cac44
|
@ -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 );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue