7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 21:33:44 +00:00

Settings: make sure file history size is at least 1

This commit is contained in:
Mike Williams 2024-02-07 08:59:38 -05:00
parent 169114fd07
commit 6125a183b4

View File

@ -820,7 +820,7 @@ void EDA_BASE_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
int fileHistorySize = Pgm().GetCommonSettings()->m_System.file_history_size;
// Load the recently used files into the history menu
m_fileHistory = new FILE_HISTORY( (unsigned) std::max( 0, fileHistorySize ),
m_fileHistory = new FILE_HISTORY( (unsigned) std::max( 1, fileHistorySize ),
ID_FILE1, ID_FILE_LIST_CLEAR );
m_fileHistory->Load( *aCfg );
}