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
This commit is contained in:
jean-pierre charras 2017-12-18 09:48:56 +01:00
parent ff4829eee6
commit 9d4bfbded8
1 changed files with 1 additions and 1 deletions

View File

@ -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 ) );