pcbnew: center the zone fill confirmation dialog

The zone fill confirmation should follow the parent dialog.  In the case
of plotting, this is the plot window.
This commit is contained in:
Seth Hillbrand 2018-09-08 20:18:14 -07:00
parent b987126b7d
commit fb580d3694
3 changed files with 9 additions and 6 deletions

View File

@ -65,9 +65,9 @@ extern void CreateThermalReliefPadPolygon( SHAPE_POLY_SET& aCornerBuffer,
static double s_thermalRot = 450; // angle of stubs in thermal reliefs for round pads
static const bool s_DumpZonesWhenFilling = false;
ZONE_FILLER::ZONE_FILLER( BOARD* aBoard, COMMIT* aCommit ) :
m_board( aBoard ), m_commit( aCommit ), m_progressReporter( nullptr ),
m_next( 0 ), m_count_done( 0 )
ZONE_FILLER::ZONE_FILLER( BOARD* aBoard, COMMIT* aCommit, wxWindow* aActiveWindow ) :
m_board( aBoard ), m_commit( aCommit ), m_activeWindow( aActiveWindow ),
m_progressReporter( nullptr ), m_next( 0 ), m_count_done( 0 )
{
}
@ -185,7 +185,8 @@ bool ZONE_FILLER::Fill( std::vector<ZONE_CONTAINER*> aZones, bool aCheck )
if( aCheck )
{
bool cancel = !outOfDate || !IsOK( nullptr, _( "Zone fills are out-of-date. Re-fill?" ) );
bool cancel = !outOfDate || !IsOK( m_activeWindow,
_( "Zone fills are out-of-date. Re-fill?" ) );
if( m_progressReporter )
{

View File

@ -38,7 +38,8 @@ class SHAPE_LINE_CHAIN;
class ZONE_FILLER
{
public:
ZONE_FILLER( BOARD* aBoard, COMMIT* aCommit = nullptr );
ZONE_FILLER( BOARD* aBoard, COMMIT* aCommit = nullptr,
wxWindow* aActiveWindow = nullptr );
~ZONE_FILLER();
void SetProgressReporter( WX_PROGRESS_REPORTER* aReporter );
@ -117,6 +118,7 @@ private:
BOARD* m_board;
COMMIT* m_commit;
wxWindow* m_activeWindow;
WX_PROGRESS_REPORTER* m_progressReporter;
std::atomic_size_t m_next; // An index into the vector of zones to fill.

View File

@ -119,7 +119,7 @@ void PCB_EDIT_FRAME::Check_All_Zones( wxWindow* aActiveWindow )
std::unique_ptr<WX_PROGRESS_REPORTER> progressReporter(
new WX_PROGRESS_REPORTER( aActiveWindow, _( "Checking Zones" ), 3 ) );
ZONE_FILLER filler( GetBoard(), &commit );
ZONE_FILLER filler( GetBoard(), &commit, aActiveWindow );
filler.SetProgressReporter( progressReporter.get() );
if( filler.Fill( toFill, true ) )