From 076633bb5e7299f017f7f6e4384bbce3ac9b5902 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 13 Nov 2017 23:21:08 +0100 Subject: [PATCH] Library Editor: disable 'save component' for read-only libraries --- eeschema/libeditframe.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index f4eb10a86c..de1c3e8243 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -520,7 +520,8 @@ void LIB_EDIT_FRAME::OnUpdatePartModified( wxUpdateUIEvent& aEvent ) const wxString& libName = libId.GetLibNickname(); aEvent.Enable( !partName.IsEmpty() && !libName.IsEmpty() - && m_libMgr->IsPartModified( partName, libName ) ); + && m_libMgr->IsPartModified( partName, libName ) + && ( aEvent.GetId() == ID_LIBEDIT_REVERT_PART || !m_libMgr->IsLibraryReadOnly( libName ) ) ); }