From 0c4828df123dfa5a06056ed1cc3ce811de169e78 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 15 Aug 2018 15:55:32 +0200 Subject: [PATCH] footprint_wizard_frame: try to fix a crash that happens sometimes when modifying a parameter. (not noticed on Windows, happens sometimes on Linux. so this commit is just a trial to fix the crash) --- pcbnew/footprint_wizard_frame_functions.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pcbnew/footprint_wizard_frame_functions.cpp b/pcbnew/footprint_wizard_frame_functions.cpp index c9f519e172..703f753261 100644 --- a/pcbnew/footprint_wizard_frame_functions.cpp +++ b/pcbnew/footprint_wizard_frame_functions.cpp @@ -2,8 +2,8 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2012 Miguel Angel Ajo Pelayo, miguelangel@nbee.es - * Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 2004-2017 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 2004-2018 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 @@ -43,6 +43,7 @@ #include #include +#include void FOOTPRINT_WIZARD_FRAME::Process_Special_Functions( wxCommandEvent& event ) { @@ -121,6 +122,10 @@ void FOOTPRINT_WIZARD_FRAME::ReloadFootprint() return; SetCurItem( NULL ); + + if( IsGalCanvasActive() ) + m_toolManager->ResetTools( TOOL_BASE::MODEL_RELOAD ); + // Delete the current footprint GetBoard()->m_Modules.DeleteAll();