From 9d4bfbded8627d9f96717a6401f950c7441ee2d0 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 18 Dec 2017 09:48:56 +0100 Subject: [PATCH] libedit, UI very minor change: Enable "save curr lib" tool of main toolbar when modified even if this lib is empty. It happens when all items are erased, and it is consistent with the close libedit dialog that ask for saving all modified libraries --- eeschema/libeditframe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index 9ae501f48a..d40db851e5 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -576,7 +576,7 @@ void LIB_EDIT_FRAME::OnUpdateRedo( wxUpdateUIEvent& event ) void LIB_EDIT_FRAME::OnUpdateSaveLib( wxUpdateUIEvent& event ) { wxString lib = getTargetLib(); - bool readOnly = lib.IsEmpty() || m_libMgr->IsLibraryReadOnly( lib ); + bool readOnly = m_libMgr->IsLibraryReadOnly( lib ); event.SetText( readOnly ? _( "Save library [Read Only]" ) : _( "Save library" ) ); event.Enable( !readOnly && m_libMgr->IsLibraryModified( lib ) );