pcbnew: can't return a copy of ptr_vector if items are polymorphic and have no clone() methods. Work it around.
This commit is contained in:
parent
6cd7d9fb89
commit
5bb06e5ac5
|
@ -93,6 +93,7 @@ protected:
|
|||
PCB_LAYER_WIDGET* m_Layers;
|
||||
|
||||
PARAM_CFG_ARRAY m_configParams; ///< List of Pcbnew configuration settings.
|
||||
PARAM_CFG_ARRAY m_projectFileParams;
|
||||
|
||||
wxString m_lastNetListRead; ///< Last net list read with relative path.
|
||||
|
||||
|
@ -380,7 +381,7 @@ public:
|
|||
* @return PARAM_CFG_ARRAY - it is only good until SetBoard() is called, so
|
||||
* don't keep it around past that event.
|
||||
*/
|
||||
PARAM_CFG_ARRAY GetProjectFileParameters();
|
||||
PARAM_CFG_ARRAY& GetProjectFileParameters();
|
||||
|
||||
/**
|
||||
* Function SaveProjectSettings
|
||||
|
|
|
@ -125,21 +125,21 @@ void PCB_EDIT_FRAME::SaveProjectSettings( bool aAskForSave )
|
|||
}
|
||||
|
||||
|
||||
PARAM_CFG_ARRAY PCB_EDIT_FRAME::GetProjectFileParameters()
|
||||
PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetProjectFileParameters()
|
||||
{
|
||||
PARAM_CFG_ARRAY pca;
|
||||
m_projectFileParams.clear();
|
||||
|
||||
// This one cannot be cached because some settings are going to/from the BOARD,
|
||||
// so pointers into that cannot be saved for long.
|
||||
|
||||
pca.push_back( new PARAM_CFG_FILENAME( wxT( "PageLayoutDescrFile" ),
|
||||
m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "PageLayoutDescrFile" ),
|
||||
&BASE_SCREEN::m_PageLayoutDescrFileName ) );
|
||||
|
||||
pca.push_back( new PARAM_CFG_FILENAME( wxT( "LastNetListRead" ), &m_lastNetListRead ) );
|
||||
m_projectFileParams.push_back( new PARAM_CFG_FILENAME( wxT( "LastNetListRead" ), &m_lastNetListRead ) );
|
||||
|
||||
GetBoard()->GetDesignSettings().AppendConfigs( GetBoard(), &pca );
|
||||
GetBoard()->GetDesignSettings().AppendConfigs( GetBoard(), &m_projectFileParams);
|
||||
|
||||
return pca;
|
||||
return m_projectFileParams;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue