From 9a82bc396cd37d669b0b9ffcbaeace88625c9035 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 16 Nov 2019 23:03:46 +0000 Subject: [PATCH] Use lazy-mode update for the reporter when updating footprints. --- pcbnew/dialogs/dialog_exchange_footprints.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pcbnew/dialogs/dialog_exchange_footprints.cpp b/pcbnew/dialogs/dialog_exchange_footprints.cpp index 4da421ba17..e177d3c34d 100644 --- a/pcbnew/dialogs/dialog_exchange_footprints.cpp +++ b/pcbnew/dialogs/dialog_exchange_footprints.cpp @@ -139,6 +139,8 @@ DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent, m_resetTextItemEffects->SetValue( g_resetTextItemEffects ); m_reset3DModels->SetValue( g_reset3DModels ); + m_MessageWindow->SetLazyUpdate( true ); + // DIALOG_SHIM needs a unique hash_key because classname is not sufficient // because the update and change versions of this dialog have different controls. m_hash_key = TO_UTF8( GetTitle() ); @@ -287,7 +289,7 @@ void DIALOG_EXCHANGE_FOOTPRINTS::OnApplyClicked( wxCommandEvent& event ) wxBusyCursor dummy; m_MessageWindow->Clear(); - m_MessageWindow->Flush( true ); + m_MessageWindow->Flush( false ); if( processMatchingModules() ) { @@ -295,6 +297,8 @@ void DIALOG_EXCHANGE_FOOTPRINTS::OnApplyClicked( wxCommandEvent& event ) m_parent->GetCanvas()->Refresh(); } + m_MessageWindow->Flush( false ); + m_commit.Push( wxT( "Changed footprint" ) ); } @@ -346,7 +350,6 @@ bool DIALOG_EXCHANGE_FOOTPRINTS::processMatchingModules() bool DIALOG_EXCHANGE_FOOTPRINTS::processModule( MODULE* aModule, const LIB_ID& aNewFPID ) { LIB_ID oldFPID = aModule->GetFPID(); - REPORTER& reporter = m_MessageWindow->Reporter(); wxString msg; // Load new module. @@ -361,7 +364,7 @@ bool DIALOG_EXCHANGE_FOOTPRINTS::processModule( MODULE* aModule, const LIB_ID& a if( !newModule ) { msg << ": " << _( "*** footprint not found ***" ); - reporter.Report( msg, REPORTER::RPT_ERROR ); + m_MessageWindow->Report( msg, REPORTER::RPT_ERROR ); return false; } @@ -375,7 +378,7 @@ bool DIALOG_EXCHANGE_FOOTPRINTS::processModule( MODULE* aModule, const LIB_ID& a m_currentModule = newModule; msg += ": OK"; - reporter.Report( msg, REPORTER::RPT_ACTION ); + m_MessageWindow->Report( msg, REPORTER::RPT_ACTION ); return true; }