From af514cac448f8c002ed0ce2d1bca5afdd1e108d0 Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Sun, 29 Dec 2019 18:47:18 +0800 Subject: [PATCH] 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. --- cvpcb/cvpcb_mainframe.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/cvpcb/cvpcb_mainframe.cpp b/cvpcb/cvpcb_mainframe.cpp index e1324df10e..0309ae413b 100644 --- a/cvpcb/cvpcb_mainframe.cpp +++ b/cvpcb/cvpcb_mainframe.cpp @@ -264,8 +264,6 @@ void CVPCB_MAINFRAME::setupEventHandlers() Bind( wxEVT_BUTTON, [this]( wxCommandEvent& ) { - // Throw away modifications on a Cancel - m_modified = false; Close( false ); }, wxID_CANCEL );