File history (recent opened files): fix incorrect behavior when a filename
contains non ascii8 code (utf16 value)
This commit is contained in:
parent
ff3d5f0de6
commit
a8028e57ee
|
@ -49,7 +49,9 @@ void FILE_HISTORY::Load( const APP_SETTINGS_BASE& aSettings )
|
|||
// file_history stores the most recent file first
|
||||
for( auto it = aSettings.m_System.file_history.rbegin();
|
||||
it != aSettings.m_System.file_history.rend(); ++it )
|
||||
{
|
||||
AddFileToHistory( *it );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -66,8 +68,8 @@ void FILE_HISTORY::Save( APP_SETTINGS_BASE& aSettings )
|
|||
{
|
||||
aSettings.m_System.file_history.clear();
|
||||
|
||||
for( const auto& file : m_fileHistory )
|
||||
aSettings.m_System.file_history.emplace_back( file.ToStdString() );
|
||||
for( const wxString& filename : m_fileHistory )
|
||||
aSettings.m_System.file_history.emplace_back( filename );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue