From 81a0ab4d7e3f411145d6f764df511f7887350753 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 10 Jan 2019 16:27:25 +0000 Subject: [PATCH] Don't return wxID_OK from a cancel. Also fixes the Save icon not getting enabled/disabled. Fixes: lp:1810116 * https://bugs.launchpad.net/kicad/+bug/1810116 --- eeschema/dialogs/dialog_lib_edit_pin_table.cpp | 4 ++-- eeschema/libedit/lib_edit_frame.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eeschema/dialogs/dialog_lib_edit_pin_table.cpp b/eeschema/dialogs/dialog_lib_edit_pin_table.cpp index 0e7dbed407..93cad792b1 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin_table.cpp +++ b/eeschema/dialogs/dialog_lib_edit_pin_table.cpp @@ -655,9 +655,9 @@ void DIALOG_LIB_EDIT_PIN_TABLE::OnClose( wxCloseEvent& event ) } if( IsQuasiModal() ) - EndQuasiModal( wxID_OK ); + EndQuasiModal( wxID_CANCEL ); else if( IsModal() ) - EndModal( wxID_OK ); + EndModal( wxID_CANCEL ); else event.Skip(); } diff --git a/eeschema/libedit/lib_edit_frame.cpp b/eeschema/libedit/lib_edit_frame.cpp index 81c453d59d..9c71655411 100644 --- a/eeschema/libedit/lib_edit_frame.cpp +++ b/eeschema/libedit/lib_edit_frame.cpp @@ -173,6 +173,7 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_UPDATE_UI( wxID_PASTE, LIB_EDIT_FRAME::OnUpdatePaste ) EVT_UPDATE_UI( ID_LIBEDIT_EXPORT_PART, LIB_EDIT_FRAME::OnUpdateHavePart ) EVT_UPDATE_UI( ID_LIBEDIT_SAVE, LIB_EDIT_FRAME::OnUpdateSave ) + EVT_UPDATE_UI( ID_LIBEDIT_SAVE_ALL, LIB_EDIT_FRAME::OnUpdateSave ) EVT_UPDATE_UI( ID_LIBEDIT_SAVE_AS, LIB_EDIT_FRAME::OnUpdateSaveAs ) EVT_UPDATE_UI( ID_LIBEDIT_REVERT, LIB_EDIT_FRAME::OnUpdateRevert ) EVT_UPDATE_UI( ID_LIBEDIT_CHECK_PART, LIB_EDIT_FRAME::OnUpdateEditingPart )