Revert "Eeschema: remove rogue symbol libraries from project file."

This reverts commit 5d60fe6812.
This commit is contained in:
Wayne Stambaugh 2019-08-04 12:33:19 -04:00
parent 72c0267fe6
commit 0893e0043f
4 changed files with 5 additions and 43 deletions

View File

@ -226,8 +226,7 @@ void SCH_EDIT_FRAME::InstallPreferences( PAGED_DIALOG* aParent )
book->AddPage( new PANEL_EESCHEMA_SETTINGS( this, book ), _( "Eeschema" ) ); book->AddPage( new PANEL_EESCHEMA_SETTINGS( this, book ), _( "Eeschema" ) );
book->AddSubPage( new PANEL_EESCHEMA_DISPLAY_OPTIONS( this, book ), _( "Display Options" ) ); book->AddSubPage( new PANEL_EESCHEMA_DISPLAY_OPTIONS( this, book ), _( "Display Options" ) );
book->AddSubPage( new PANEL_EESCHEMA_COLOR_CONFIG( this, book ), _( "Colors" ) ); book->AddSubPage( new PANEL_EESCHEMA_COLOR_CONFIG( this, book ), _( "Colors" ) );
book->AddSubPage( new PANEL_EESCHEMA_TEMPLATE_FIELDNAMES( this, book ), book->AddSubPage( new PANEL_EESCHEMA_TEMPLATE_FIELDNAMES( this, book ), _( "Field Name Templates" ) );
_( "Field Name Templates" ) );
} }
@ -356,7 +355,6 @@ static const wxString PrintSheetRefEntry = "PrintSheetReferenceAndTitle
static const wxString RepeatStepXEntry = "RepeatStepX"; static const wxString RepeatStepXEntry = "RepeatStepX";
static const wxString RepeatStepYEntry = "RepeatStepY"; static const wxString RepeatStepYEntry = "RepeatStepY";
static const wxString RepeatLabelIncrementEntry = "RepeatLabelIncrement"; static const wxString RepeatLabelIncrementEntry = "RepeatLabelIncrement";
static const wxString ShowIllegalSymboLibDialog = "ShowIllegalSymbolLibDialog";
// Library editor wxConfig entry names. // Library editor wxConfig entry names.
static const wxChar defaultLibWidthEntry[] = wxT( "LibeditLibWidth" ); static const wxChar defaultLibWidthEntry[] = wxT( "LibeditLibWidth" );
@ -397,11 +395,8 @@ PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetConfigurationSettings()
-REPEAT_OFFSET_MAX, -REPEAT_OFFSET_MAX,
REPEAT_OFFSET_MAX ) ); REPEAT_OFFSET_MAX ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, RepeatLabelIncrementEntry, m_configSettings.push_back( new PARAM_CFG_INT( true, RepeatLabelIncrementEntry,
&m_repeatDeltaLabel, DEFAULT_REPEAT_LABEL_INC, &m_repeatDeltaLabel,
-10, +10 ) ); DEFAULT_REPEAT_LABEL_INC, -10, +10 ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, ShowIllegalSymboLibDialog,
&m_showIllegalSymbolLibDialog, true ) );
return m_configSettings; return m_configSettings;
} }
@ -556,8 +551,7 @@ void LIB_EDIT_FRAME::LoadSettings( wxConfigBase* aCfg )
ReadHotkeyConfig( LIB_EDIT_FRAME_NAME, g_Libedit_Hotkeys_Descr ); ReadHotkeyConfig( LIB_EDIT_FRAME_NAME, g_Libedit_Hotkeys_Descr );
SetDefaultLineThickness( (int) aCfg->Read( DefaultDrawLineWidthEntry, SetDefaultLineThickness( (int) aCfg->Read( DefaultDrawLineWidthEntry, DEFAULTDRAWLINETHICKNESS ) );
DEFAULTDRAWLINETHICKNESS ) );
SetDefaultPinLength( (int) aCfg->Read( DefaultPinLengthEntry, DEFAULTPINLENGTH ) ); SetDefaultPinLength( (int) aCfg->Read( DefaultPinLengthEntry, DEFAULTPINLENGTH ) );
m_textPinNumDefaultSize = (int) aCfg->Read( defaultPinNumSizeEntry, DEFAULTPINNUMSIZE ); m_textPinNumDefaultSize = (int) aCfg->Read( defaultPinNumSizeEntry, DEFAULTPINNUMSIZE );
m_textPinNameDefaultSize = (int) aCfg->Read( defaultPinNameSizeEntry, DEFAULTPINNAMESIZE ); m_textPinNameDefaultSize = (int) aCfg->Read( defaultPinNameSizeEntry, DEFAULTPINNAMESIZE );

View File

@ -351,36 +351,6 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
} }
else else
{ {
// Double check to ensure no legacy library list entries have been
// added to the projec file symbol library list.
wxString paths;
wxArrayString libNames;
PART_LIBS::LibNamesAndPaths( &Prj(), false, &paths, &libNames );
if( !libNames.IsEmpty() )
{
if( m_showIllegalSymbolLibDialog )
{
wxRichMessageDialog invalidLibDlg(
this,
_( "Illegal entry found in project file symbol library list." ),
_( "Project Load Warning" ),
wxOK | wxCENTER | wxICON_EXCLAMATION );
invalidLibDlg.SetExtendedMessage(
_( "Symbol libraries defined in the project file symbol library list "
"are no longer supported and will be\nremoved. This may cause "
"broken symbol library links under certain conditions." ) );
invalidLibDlg.ShowCheckBox( _( "Do not show this dialog again." ) );
invalidLibDlg.ShowModal();
m_showIllegalSymbolLibDialog = !invalidLibDlg.IsCheckBoxChecked();
}
libNames.Clear();
paths.Clear();
PART_LIBS::LibNamesAndPaths( &Prj(), true, &paths, &libNames );
}
// Check to see whether some old library parts need to be rescued // Check to see whether some old library parts need to be rescued
// Only do this if RescueNeverShow was not set. // Only do this if RescueNeverShow was not set.
wxConfigBase *config = Kiface().KifaceSettings(); wxConfigBase *config = Kiface().KifaceSettings();

View File

@ -386,7 +386,6 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ):
m_findReplaceStatus = new wxString( wxEmptyString ); m_findReplaceStatus = new wxString( wxEmptyString );
m_undoItem = NULL; m_undoItem = NULL;
m_hasAutoSave = true; m_hasAutoSave = true;
m_showIllegalSymbolLibDialog = true;
m_FrameSize = ConvertDialogToPixels( wxSize( 500, 350 ) ); // default in case of no prefs m_FrameSize = ConvertDialogToPixels( wxSize( 500, 350 ) ); // default in case of no prefs
m_AboutTitle = "Eeschema"; m_AboutTitle = "Eeschema";

View File

@ -150,7 +150,6 @@ private:
bool m_autoplaceJustify; ///< allow autoplace to change justification bool m_autoplaceJustify; ///< allow autoplace to change justification
bool m_autoplaceAlign; ///< align autoplaced fields to the grid bool m_autoplaceAlign; ///< align autoplaced fields to the grid
bool m_footprintPreview; ///< whether to show footprint previews bool m_footprintPreview; ///< whether to show footprint previews
bool m_showIllegalSymbolLibDialog;
/// An index to the last find item in the found items list #m_foundItems. /// An index to the last find item in the found items list #m_foundItems.
int m_foundItemIndex; int m_foundItemIndex;