Fix compatibility with older wxWidgets versions.

Fix also a compil warning
This commit is contained in:
jean-pierre charras 2023-02-03 08:22:34 +01:00
parent 9b9ebebb2d
commit 8ce0a84ca7
2 changed files with 5 additions and 3 deletions

View File

@ -1586,12 +1586,12 @@ size_t SCH_SCREEN::getLibSymbolNameMatches( const SCH_SYMBOL& aSymbol,
searchName = aSymbol.GetLibId().GetUniStringLibItemName() + wxS( "_" );
int tmp;
long tmp;
wxString suffix;
for( auto pair : m_libSymbols )
{
if( pair.first.StartsWith( searchName, &suffix ) && suffix.ToInt( &tmp ) )
if( pair.first.StartsWith( searchName, &suffix ) && suffix.ToLong( &tmp ) )
aMatches.emplace_back( pair.first );
}

View File

@ -4,7 +4,7 @@
* Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 2013-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2013-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@ -1099,7 +1099,9 @@ void PCB_EDIT_FRAME::doCloseWindow()
// Remove the auto save file on a normal close of Pcbnew.
if( fn.FileExists() && !wxRemoveFile( fn.GetFullPath() ) )
{
wxLogTrace( traceAutoSave, wxT( "The auto save file could not be removed!" ) );
}
// Make sure local settings are persisted
SaveProjectSettings();