Try to fix a regression on OSX
Fixes: lp:1740909 https://bugs.launchpad.net/kicad/+bug/1740909
This commit is contained in:
parent
e0f819d02e
commit
63e55e9180
|
@ -408,8 +408,17 @@ void DRC::RunTests( wxTextCtrl* aMessages )
|
|||
wxSafeYield();
|
||||
}
|
||||
|
||||
m_pcbEditorFrame->Fill_All_Zones( aMessages ? aMessages->GetParent() : m_pcbEditorFrame,
|
||||
false );
|
||||
// Refill all zones
|
||||
// On OSX the progress bar managed by Fill_All_Zones() create issues
|
||||
// when Fill_All_Zones() is called by a QuasiModal dialog
|
||||
// so it is not shown on OSX, until a better fix is found
|
||||
#ifdef __WXMAC__
|
||||
wxWindow* caller = nullptr; // Do not show progress bar
|
||||
#else
|
||||
// caller (a wxTopLevelFrame) is the wxDialog or the Pcb Editor frame that call DRC:
|
||||
wxWindow* caller = aMessages ? aMessages->GetParent() : m_pcbEditorFrame;
|
||||
#endif
|
||||
m_pcbEditorFrame->Fill_All_Zones( caller, true );
|
||||
|
||||
// test zone clearances to other zones
|
||||
if( aMessages )
|
||||
|
|
|
@ -103,13 +103,17 @@ int PCB_EDIT_FRAME::Fill_All_Zones( wxWindow * aActiveWindow, bool aVerbose )
|
|||
|
||||
ZONE_FILLER filler( GetBoard() );
|
||||
|
||||
std::unique_ptr<WX_PROGRESS_REPORTER> progressReporter(
|
||||
// progressReporter must be created *only* if needed
|
||||
if( aActiveWindow )
|
||||
{
|
||||
std::unique_ptr<WX_PROGRESS_REPORTER> progressReporter(
|
||||
new WX_PROGRESS_REPORTER( aActiveWindow, _( "Fill All Zones" ), 3 ) );
|
||||
|
||||
if( aVerbose )
|
||||
filler.SetProgressReporter( progressReporter.get() );
|
||||
|
||||
filler.Fill( toFill );
|
||||
filler.Fill( toFill );
|
||||
}
|
||||
else // do not use a WX_PROGRESS_REPORTER in ZONE_FILLER instance
|
||||
filler.Fill( toFill );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue