44 m_selectionTool( nullptr )
52 m_commit = std::make_unique<BOARD_COMMIT>(
this );
69 bool updateMode =
false;
70 bool currentMode =
false;
100 wxFAIL_MSG( wxT(
"ExchangeFootprints: unexpected action" ) );
115 std::map<PCB_LAYER_ID, PCB_LAYER_ID>& aLayerMap )
122 if( aLayerMap.count( original ) )
123 newLayers.set( aLayerMap[ original ] );
125 newLayers.set( original );
128 if( originalLayers.
Seq() != newLayers.
Seq() )
142 std::map<PCB_LAYER_ID, PCB_LAYER_ID> layerMap;
146 if( dlg.ShowModal() != wxID_OK )
149 bool hasChanges =
false;
159 if(
via->GetViaType() == VIATYPE::THROUGH )
162 via->LayerPair( &top_layer, &bottom_layer );
164 if( layerMap[bottom_layer] != bottom_layer || layerMap[top_layer] != top_layer )
167 via->SetLayerPair( layerMap[top_layer], layerMap[bottom_layer] );
187 m_commit->Push( wxT(
"Swap Layers" ) );
243 if( dialogResult == wxID_CANCEL )
#define SKIP_CONNECTIVITY
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Revert the commit by restoring the modified items state.
void SetDefaultZoneSettings(const ZONE_SETTINGS &aSettings)
ZONE_SETTINGS & GetDefaultZoneSettings()
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual LSET GetLayerSet() const
Return a std::bitset of all layers on which the item physically resides.
virtual void SetLayerSet(LSET aLayers)
Information pertinent to a Pcbnew printed circuit board.
bool BuildConnectivity(PROGRESS_REPORTER *aReporter=nullptr)
Build or rebuild the board connectivity database for the board, especially the list of connected item...
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Create an undo entry for an item that has been already modified.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
static const TOOL_EVENT ConnectivityChangedEvent
Selected item had a property changed (except movement)
Used when the right click button is pressed, or when the select tool is in effect.
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const override
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
LSET is a set of PCB_LAYER_IDs.
LSEQ Seq(const PCB_LAYER_ID *aWishListSequence, unsigned aCount) const
Return an LSEQ from the union of this LSET and a desired sequence.
static TOOL_ACTION editTracksAndVias
static TOOL_ACTION swapLayers
static TOOL_ACTION zonesManager
static TOOL_ACTION zoneFillAll
static TOOL_ACTION updateFootprint
static TOOL_ACTION cleanupTracksAndVias
static TOOL_ACTION editTextAndGraphics
static TOOL_ACTION globalDeletions
static TOOL_ACTION updateFootprints
static TOOL_ACTION removeUnusedPads
static TOOL_ACTION changeFootprints
static TOOL_ACTION changeFootprint
static TOOL_ACTION editTeardrops
static TOOL_ACTION cleanupGraphics
void OnModify() override
Must be called after a change in order to set the "modify" flag and update other data structures and ...
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void RedrawRatsnest()
Return the bounding box of the view that should be used if model is not valid.
The main frame for Pcbnew.
void OnModify() override
Must be called after a board change to set the modified flag.
bool Empty() const
Checks if there is anything selected.
size_t CountType(KICAD_T aType) const
ZONE_SETTINGS handles zones parameters.
Handle a list of polygons defining a copper zone.
int InvokeZonesManager(PCB_BASE_FRAME *aCaller, ZONE_SETTINGS *aZoneInfo)
Function InvokeZonesManager invokes up a modal dialog window for zones manager.
PCB_LAYER_ID
A quick note on layer IDs:
@ GEOMETRY
Position or shape has changed.
std::vector< FAB_LAYER_COLOR > dummy
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
#define ZONE_MANAGER_REPOUR