Use lazy-mode update for the reporter when updating footprints.

This commit is contained in:
Jeff Young 2019-11-16 23:03:46 +00:00
parent 490bc2874f
commit 9a82bc396c
1 changed files with 7 additions and 4 deletions

View File

@ -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;
}