Revert change for 11299, and update removed-pad items after zone fills.
Fixes https://gitlab.com/kicad/code/kicad/issues/12645
This commit is contained in:
parent
b012cc1ac3
commit
4af98827fd
|
@ -613,7 +613,7 @@ bool PCB_VIA::FlashLayer( int aLayer ) const
|
||||||
|
|
||||||
// Must be static to keep from raising its ugly head in performance profiles
|
// Must be static to keep from raising its ugly head in performance profiles
|
||||||
static std::initializer_list<KICAD_T> connectedTypes = { PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T,
|
static std::initializer_list<KICAD_T> connectedTypes = { PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T,
|
||||||
PCB_PAD_T };
|
PCB_PAD_T, PCB_ZONE_T, PCB_FP_ZONE_T };
|
||||||
|
|
||||||
// Do not check zones. Doing so results in race conditions when the via collides with
|
// Do not check zones. Doing so results in race conditions when the via collides with
|
||||||
// two different zones of different priorities.
|
// two different zones of different priorities.
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
#include <connectivity/connectivity_data.h>
|
#include <connectivity/connectivity_data.h>
|
||||||
#include <board_commit.h>
|
#include <board_commit.h>
|
||||||
#include <footprint.h>
|
#include <footprint.h>
|
||||||
|
#include <pcb_track.h>
|
||||||
|
#include <pad.h>
|
||||||
#include <pcb_group.h>
|
#include <pcb_group.h>
|
||||||
#include <board_design_settings.h>
|
#include <board_design_settings.h>
|
||||||
#include <progress_reporter.h>
|
#include <progress_reporter.h>
|
||||||
|
@ -96,7 +98,8 @@ void ZONE_FILLER_TOOL::CheckAllZones( wxWindow* aCaller, PROGRESS_REPORTER* aRep
|
||||||
|
|
||||||
board()->BuildConnectivity();
|
board()->BuildConnectivity();
|
||||||
|
|
||||||
canvas()->Refresh();
|
refresh();
|
||||||
|
|
||||||
m_fillInProgress = false;
|
m_fillInProgress = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +177,8 @@ void ZONE_FILLER_TOOL::FillAllZones( wxWindow* aCaller, PROGRESS_REPORTER* aRepo
|
||||||
if( filler.IsDebug() )
|
if( filler.IsDebug() )
|
||||||
frame->UpdateUserInterface();
|
frame->UpdateUserInterface();
|
||||||
|
|
||||||
canvas()->Refresh();
|
refresh();
|
||||||
|
|
||||||
m_fillInProgress = false;
|
m_fillInProgress = false;
|
||||||
|
|
||||||
// wxWidgets has keyboard focus issues after the progress reporter. Re-setting the focus
|
// wxWidgets has keyboard focus issues after the progress reporter. Re-setting the focus
|
||||||
|
@ -256,7 +260,8 @@ int ZONE_FILLER_TOOL::ZoneFillDirty( const TOOL_EVENT& aEvent )
|
||||||
if( filler.IsDebug() )
|
if( filler.IsDebug() )
|
||||||
frame->UpdateUserInterface();
|
frame->UpdateUserInterface();
|
||||||
|
|
||||||
canvas()->Refresh();
|
refresh();
|
||||||
|
|
||||||
m_fillInProgress = false;
|
m_fillInProgress = false;
|
||||||
|
|
||||||
// wxWidgets has keyboard focus issues after the progress reporter. Re-setting the focus
|
// wxWidgets has keyboard focus issues after the progress reporter. Re-setting the focus
|
||||||
|
@ -311,7 +316,8 @@ int ZONE_FILLER_TOOL::ZoneFill( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
board()->BuildConnectivity( reporter.get() );
|
board()->BuildConnectivity( reporter.get() );
|
||||||
|
|
||||||
canvas()->Refresh();
|
refresh();
|
||||||
|
|
||||||
m_fillInProgress = false;
|
m_fillInProgress = false;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -340,7 +346,8 @@ int ZONE_FILLER_TOOL::ZoneUnfill( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
commit.Push( _( "Unfill Zone" ), ZONE_FILL_OP );
|
commit.Push( _( "Unfill Zone" ), ZONE_FILL_OP );
|
||||||
canvas()->Refresh();
|
|
||||||
|
refresh();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -358,12 +365,34 @@ int ZONE_FILLER_TOOL::ZoneUnfillAll( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
commit.Push( _( "Unfill All Zones" ), ZONE_FILL_OP );
|
commit.Push( _( "Unfill All Zones" ), ZONE_FILL_OP );
|
||||||
canvas()->Refresh();
|
|
||||||
|
refresh();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ZONE_FILLER_TOOL::refresh()
|
||||||
|
{
|
||||||
|
canvas()->GetView()->UpdateAllItemsConditionally( KIGFX::REPAINT,
|
||||||
|
[&]( KIGFX::VIEW_ITEM* aItem ) -> bool
|
||||||
|
{
|
||||||
|
if( PCB_VIA* via = dynamic_cast<PCB_VIA*>( aItem ) )
|
||||||
|
{
|
||||||
|
return via->GetRemoveUnconnected();
|
||||||
|
}
|
||||||
|
else if( PAD* pad = dynamic_cast<PAD*>( aItem ) )
|
||||||
|
{
|
||||||
|
return pad->GetRemoveUnconnected();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
} );
|
||||||
|
|
||||||
|
canvas()->Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ZONE_FILLER_TOOL::setTransitions()
|
void ZONE_FILLER_TOOL::setTransitions()
|
||||||
{
|
{
|
||||||
// Zone actions
|
// Zone actions
|
||||||
|
|
|
@ -68,6 +68,8 @@ private:
|
||||||
///< Refocus on an idle event (used after the Progress Reporter messes up the focus).
|
///< Refocus on an idle event (used after the Progress Reporter messes up the focus).
|
||||||
void singleShotRefocus( wxIdleEvent& );
|
void singleShotRefocus( wxIdleEvent& );
|
||||||
|
|
||||||
|
void refresh();
|
||||||
|
|
||||||
///< Set up handlers for various events.
|
///< Set up handlers for various events.
|
||||||
void setTransitions() override;
|
void setTransitions() override;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue