Fix assert that occasionally happened when loading file history
ClearFileHistory must be used to update the underlying data
This commit is contained in:
parent
961fbadd23
commit
5d14dc9034
|
@ -44,7 +44,7 @@ FILE_HISTORY::FILE_HISTORY( size_t aMaxFiles, int aBaseFileId, int aClearId, wxS
|
|||
|
||||
void FILE_HISTORY::Load( const APP_SETTINGS_BASE& aSettings )
|
||||
{
|
||||
m_fileHistory.clear();
|
||||
ClearFileHistory();
|
||||
|
||||
// file_history stores the most recent file first
|
||||
for( auto it = aSettings.m_System.file_history.rbegin();
|
||||
|
@ -55,7 +55,7 @@ void FILE_HISTORY::Load( const APP_SETTINGS_BASE& aSettings )
|
|||
|
||||
void FILE_HISTORY::Load( const std::vector<wxString>& aList )
|
||||
{
|
||||
m_fileHistory.clear();
|
||||
ClearFileHistory();
|
||||
|
||||
for( const auto& file : aList )
|
||||
AddFileToHistory( file );
|
||||
|
|
Loading…
Reference in New Issue