Loading eeschema/lib_export.cpp +19 −9 Original line number Original line Diff line number Diff line Loading @@ -80,10 +80,15 @@ void WinEDA_LibeditFrame::OnImportPart( wxCommandEvent& event ) } } /* Routine to create a new library and backup the current component in /* Routine to create a new library and backup the current component in this * this library. * library or export the component of the current library. * Create_lib == TRUE if the backup directory of library. * createLib == TRUE if we are creating a new library. * If not: backup as the request without modifications. * If not: export the library component. * Basically these 2 options do the same thing, but for user's convenience * > When creating a new lib, the user is prompted to add the new lib to * current eeschema config library list * > When exporting there is no message (it is expected the user does not want to add the * new created lib * * * The file format is created in all cases the same. * The file format is created in all cases the same. */ */ Loading @@ -92,7 +97,7 @@ void WinEDA_LibeditFrame::OnExportPart( wxCommandEvent& event ) wxFileName fn; wxFileName fn; wxString msg, title; wxString msg, title; CMP_LIBRARY* CurLibTmp; CMP_LIBRARY* CurLibTmp; bool createLib = ( event.GetId() != ExportPartId ) ? false : true; bool createLib = ( event.GetId() == ExportPartId ) ? false : true; if( m_component == NULL ) if( m_component == NULL ) { { Loading Loading @@ -127,13 +132,18 @@ void WinEDA_LibeditFrame::OnExportPart( wxCommandEvent& event ) delete m_library; delete m_library; m_library = CurLibTmp; m_library = CurLibTmp; if( createLib && success ) if( success ) { if( createLib ) { { msg = fn.GetFullPath() + _( " - OK" ); msg = fn.GetFullPath() + _( " - OK" ); DisplayInfoMessage( this, _( "This library will not be available \ DisplayInfoMessage( this, _( "This library will not be available \ until it is loaded by EESchema.\n\nModify the EESchema library configuration \ until it is loaded by EESchema.\n\nModify the EESchema library configuration \ if you want to include it as part of this project." ) ); if you want to include it as part of this project." ) ); } } else msg = fn.GetFullPath() + _( " - Export OK" ); } // Error else else msg = _( "Error creating " ) + fn.GetFullName(); msg = _( "Error creating " ) + fn.GetFullName(); Affiche_Message( msg ); Affiche_Message( msg ); Loading Loading
eeschema/lib_export.cpp +19 −9 Original line number Original line Diff line number Diff line Loading @@ -80,10 +80,15 @@ void WinEDA_LibeditFrame::OnImportPart( wxCommandEvent& event ) } } /* Routine to create a new library and backup the current component in /* Routine to create a new library and backup the current component in this * this library. * library or export the component of the current library. * Create_lib == TRUE if the backup directory of library. * createLib == TRUE if we are creating a new library. * If not: backup as the request without modifications. * If not: export the library component. * Basically these 2 options do the same thing, but for user's convenience * > When creating a new lib, the user is prompted to add the new lib to * current eeschema config library list * > When exporting there is no message (it is expected the user does not want to add the * new created lib * * * The file format is created in all cases the same. * The file format is created in all cases the same. */ */ Loading @@ -92,7 +97,7 @@ void WinEDA_LibeditFrame::OnExportPart( wxCommandEvent& event ) wxFileName fn; wxFileName fn; wxString msg, title; wxString msg, title; CMP_LIBRARY* CurLibTmp; CMP_LIBRARY* CurLibTmp; bool createLib = ( event.GetId() != ExportPartId ) ? false : true; bool createLib = ( event.GetId() == ExportPartId ) ? false : true; if( m_component == NULL ) if( m_component == NULL ) { { Loading Loading @@ -127,13 +132,18 @@ void WinEDA_LibeditFrame::OnExportPart( wxCommandEvent& event ) delete m_library; delete m_library; m_library = CurLibTmp; m_library = CurLibTmp; if( createLib && success ) if( success ) { if( createLib ) { { msg = fn.GetFullPath() + _( " - OK" ); msg = fn.GetFullPath() + _( " - OK" ); DisplayInfoMessage( this, _( "This library will not be available \ DisplayInfoMessage( this, _( "This library will not be available \ until it is loaded by EESchema.\n\nModify the EESchema library configuration \ until it is loaded by EESchema.\n\nModify the EESchema library configuration \ if you want to include it as part of this project." ) ); if you want to include it as part of this project." ) ); } } else msg = fn.GetFullPath() + _( " - Export OK" ); } // Error else else msg = _( "Error creating " ) + fn.GetFullName(); msg = _( "Error creating " ) + fn.GetFullName(); Affiche_Message( msg ); Affiche_Message( msg ); Loading