28using namespace std::placeholders;
59 &aNetlist, aFilename, wxEmptyString ) );
61 if( !netlistReader.get() )
63 msg.Printf(
_(
"Cannot open netlist file '%s'." ), aFilename );
69 netlistReader->LoadNetlist();
74 msg.Printf(
_(
"Error loading netlist.\n%s" ), ioe.
What().GetData() );
100 if( netNamesCfg == 2 || netNamesCfg == 3 )
103 else if(
dynamic_cast<PAD*
>( aItem ) )
105 if( netNamesCfg == 1 || netNamesCfg == 3 )
113 text->ClearRenderCache();
114 text->ClearBoundingBoxCache();
129 if( !newFootprints.empty() )
132 std::copy( newFootprints.begin(), newFootprints.end(), std::back_inserter( items ) );
135 *aRunDragCommand =
true;
157 for(
unsigned ii = 0; ii < aNetlist.
GetCount(); ii++ )
164 msg.Printf(
_(
"No footprint defined for symbol %s." ),
178 path.push_back( uuid );
187 bool footprintMisMatch = fpOnBoard && fpOnBoard->
GetFPID() != component->
GetFPID();
191 msg.Printf(
_(
"Footprint of %s changed: board footprint '%s', netlist footprint '%s'." ),
201 footprintMisMatch =
false;
203 if( fpOnBoard && !footprintMisMatch )
206 if( component->
GetFPID() != lastFPID )
214 msg.Printf(
_(
"%s footprint ID '%s' is not valid." ),
227 lastFPID = component->
GetFPID();
231 msg.Printf(
_(
"%s footprint '%s' not found in any libraries in the footprint "
Update the BOARD with a new netlist.
std::vector< FOOTPRINT * > GetAddedFootprints() const
Information pertinent to a Pcbnew printed circuit board.
FOOTPRINT * FindFootprintByPath(const KIID_PATH &aPath) const
Search for a FOOTPRINT within this board with the given path.
FOOTPRINT * FindFootprintByReference(const wxString &aReference) const
Search for a FOOTPRINT within this board with the given reference designator.
Store all of the related footprint information found in a netlist.
const KIID_PATH & GetPath() const
const wxString & GetReference() const
void SetFootprint(FOOTPRINT *aFootprint)
const std::vector< KIID > & GetKIIDs() const
const LIB_ID & GetFPID() const
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
An abstract base class for deriving all objects that can be added to a VIEW.
void UpdateAllItemsConditionally(int aUpdateFlags, std::function< bool(VIEW_ITEM *)> aCondition)
Update items in the view according to the given flags and condition.
A logical library item identifier and consists of various portions much like a URI.
const UTF8 & GetLibItemName() const
static NETLIST_READER * GetNetlistReader(NETLIST *aNetlist, const wxString &aNetlistFileName, const wxString &aCompFootprintFileName=wxEmptyString)
Attempt to determine the net list file type of aNetlistFileName and return the appropriate NETLIST_RE...
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
bool GetReplaceFootprints() const
unsigned GetCount() const
COMPONENT * GetComponent(unsigned aIndex)
Return the COMPONENT at aIndex.
bool IsFindByTimeStamp() const
DISPLAY_OPTIONS m_Display
static TOOL_ACTION selectionClear
Clear the current selection.
static TOOL_ACTION selectItems
Select a list of items (specified as the event parameter)
PCBNEW_SETTINGS * GetPcbNewSettings() const
FOOTPRINT * loadFootprint(const LIB_ID &aFootprintId)
Attempts to load aFootprintId from the footprint library table.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void Compile_Ratsnest(bool aDisplayStatus)
Create the entire board ratsnest.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void SetLastPath(LAST_PATH_TYPE aType, const wxString &aLastPath)
Set the path of the last file successfully read.
bool ReadNetlistFromFile(const wxString &aFilename, NETLIST &aNetlist, REPORTER &aReporter)
Read a netlist from a file into a NETLIST object.
void OnNetlistChanged(BOARD_NETLIST_UPDATER &aUpdater, bool *aRunDragCommand)
Called after netlist is updated.
void LoadFootprints(NETLIST &aNetlist, REPORTER &aReporter)
Load the footprints for each #SCH_COMPONENT in aNetlist from the list of libraries.
static FP_LIB_TABLE * PcbFootprintLibs(PROJECT *aProject)
Return the table of footprint libraries without Kiway.
A pure virtual class used to derive REPORTER objects from.
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
std::string::size_type size() const
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
This file is part of the common library.
std::vector< EDA_ITEM * > EDA_ITEMS
Define list of drawing items for screens.
@ REPAINT
Item needs to be redrawn.
@ GEOMETRY
Position or shape has changed.
Class that computes missing connections on a PCB.