Eeschema, importFile: build the HTML report messages before displaying the dialog.
Fixes #8507 https://gitlab.com/kicad/code/kicad/issues/8507
This commit is contained in:
parent
4bb4606811
commit
37c31196f4
|
@ -43,9 +43,21 @@ public:
|
|||
void SetUnits( EDA_UNITS aUnits ) { m_units = aUnits; }
|
||||
EDA_UNITS GetUnits() const override { return m_units; }
|
||||
|
||||
/**
|
||||
* In immediate mode, messages are flushed as they are added.
|
||||
* Required for progress-related reports, but can be very slow for larger reports.
|
||||
*/
|
||||
void SetImmediateMode() { m_immediateMode = true; }
|
||||
|
||||
/**
|
||||
* Build the HTML messages page.
|
||||
* Call it if the immediate mode is not actived to be able to display them
|
||||
*/
|
||||
void Flush();
|
||||
|
||||
/**
|
||||
* Delete the stored messages
|
||||
*/
|
||||
void Clear();
|
||||
|
||||
private:
|
||||
|
|
|
@ -1118,7 +1118,10 @@ bool SCH_EDIT_FRAME::importFile( const wxString& aFileName, int aFileType )
|
|||
Schematic().SetRoot( pi->Load( aFileName, &Schematic() ) );
|
||||
|
||||
if( reporter->m_Reporter->HasMessage() )
|
||||
{
|
||||
reporter->m_Reporter->Flush(); // Build HTML messages
|
||||
reporter->ShowModal();
|
||||
}
|
||||
|
||||
pi->SetReporter( &WXLOG_REPORTER::GetInstance() );
|
||||
delete reporter;
|
||||
|
|
Loading…
Reference in New Issue