2012-02-11 09:04:26 +00:00
|
|
|
/**
|
|
|
|
* @file cvpcb/readwrite_dlgs.cpp
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2018-01-28 08:51:28 +00:00
|
|
|
* Copyright (C) 2018 Jean-Pierre Charras, jean-pierre.charras
|
2016-11-20 23:35:08 +00:00
|
|
|
* Copyright (C) 2011-2016 Wayne Stambaugh <stambaughw@verizon.net>
|
2018-01-28 08:51:28 +00:00
|
|
|
* Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
2012-02-11 09:04:26 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
#include <fctsys.h>
|
2014-07-07 04:12:04 +00:00
|
|
|
#include <kiway.h>
|
2012-02-11 09:04:26 +00:00
|
|
|
#include <common.h>
|
|
|
|
#include <confirm.h>
|
|
|
|
#include <build_version.h>
|
2013-09-14 20:33:22 +00:00
|
|
|
#include <macros.h>
|
2016-11-20 23:35:08 +00:00
|
|
|
#include <lib_id.h>
|
2013-09-14 20:33:22 +00:00
|
|
|
#include <fp_lib_table.h>
|
|
|
|
#include <reporter.h>
|
|
|
|
#include <html_messagebox.h>
|
2012-02-11 09:04:26 +00:00
|
|
|
|
|
|
|
#include <cvpcb.h>
|
|
|
|
#include <cvpcb_mainframe.h>
|
2018-01-28 08:51:28 +00:00
|
|
|
#include <listboxes.h>
|
2012-02-16 20:03:33 +00:00
|
|
|
#include <wildcards_and_files_ext.h>
|
2014-10-28 15:15:39 +00:00
|
|
|
#include <fp_conflict_assignment_selector.h>
|
2012-02-11 09:04:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName )
|
|
|
|
{
|
2013-04-25 16:29:35 +00:00
|
|
|
COMPONENT* component;
|
2012-09-26 17:22:48 +00:00
|
|
|
int componentIndex;
|
2012-02-11 09:04:26 +00:00
|
|
|
|
2013-04-25 16:29:35 +00:00
|
|
|
if( m_netlist.IsEmpty() )
|
2012-02-11 09:04:26 +00:00
|
|
|
return;
|
|
|
|
|
2013-04-25 16:29:35 +00:00
|
|
|
// If no component is selected, select the first one
|
2014-07-05 20:42:59 +00:00
|
|
|
if( m_compListBox->GetFirstSelected() < 0 )
|
2012-02-11 09:04:26 +00:00
|
|
|
{
|
2012-09-26 17:22:48 +00:00
|
|
|
componentIndex = 0;
|
2014-07-05 20:42:59 +00:00
|
|
|
m_compListBox->SetSelection( componentIndex, true );
|
2012-02-11 09:04:26 +00:00
|
|
|
}
|
|
|
|
|
2012-09-26 17:22:48 +00:00
|
|
|
// iterate over the selection
|
2014-07-05 20:42:59 +00:00
|
|
|
while( m_compListBox->GetFirstSelected() != -1 )
|
2012-09-26 15:36:48 +00:00
|
|
|
{
|
2013-04-25 16:29:35 +00:00
|
|
|
// Get the component for the current iteration
|
2014-07-05 20:42:59 +00:00
|
|
|
componentIndex = m_compListBox->GetFirstSelected();
|
2013-04-25 16:29:35 +00:00
|
|
|
component = m_netlist.GetComponent( componentIndex );
|
2012-02-11 09:04:26 +00:00
|
|
|
|
2012-09-26 17:22:48 +00:00
|
|
|
if( component == NULL )
|
|
|
|
return;
|
2012-02-11 09:04:26 +00:00
|
|
|
|
2017-06-10 12:05:30 +00:00
|
|
|
SetNewPkg( aFootprintName, componentIndex );
|
2012-09-26 15:36:48 +00:00
|
|
|
|
2017-06-10 12:05:30 +00:00
|
|
|
m_compListBox->SetSelection( componentIndex, false );
|
|
|
|
}
|
|
|
|
|
|
|
|
// select the next component, if there is one
|
|
|
|
if( componentIndex < (m_compListBox->GetCount() - 1) )
|
|
|
|
componentIndex++;
|
|
|
|
|
|
|
|
m_compListBox->SetSelection( componentIndex, true );
|
2013-09-14 20:33:22 +00:00
|
|
|
|
2017-06-10 12:05:30 +00:00
|
|
|
// update the statusbar
|
|
|
|
DisplayStatus();
|
|
|
|
}
|
2013-09-14 20:33:22 +00:00
|
|
|
|
2012-02-11 09:04:26 +00:00
|
|
|
|
2017-06-10 12:05:30 +00:00
|
|
|
void CVPCB_MAINFRAME::SetNewPkg( const wxString& aFootprintName, int aIndex )
|
|
|
|
{
|
|
|
|
COMPONENT* component;
|
2012-09-26 17:22:48 +00:00
|
|
|
|
2017-06-10 12:05:30 +00:00
|
|
|
if( m_netlist.IsEmpty() )
|
|
|
|
return;
|
2012-09-26 17:22:48 +00:00
|
|
|
|
2017-06-10 12:05:30 +00:00
|
|
|
component = m_netlist.GetComponent( aIndex );
|
|
|
|
|
|
|
|
if( component == NULL )
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Check to see if the component has already a footprint set.
|
|
|
|
bool hasFootprint = !component->GetFPID().empty();
|
|
|
|
|
|
|
|
LIB_ID fpid;
|
|
|
|
|
|
|
|
if( !aFootprintName.IsEmpty() )
|
|
|
|
{
|
2017-07-24 19:02:59 +00:00
|
|
|
wxCHECK_RET( fpid.Parse( aFootprintName ) < 0,
|
2017-12-15 11:37:46 +00:00
|
|
|
wxString::Format( wxT( "\"%s\" is not a valid LIB_ID." ),
|
2017-06-10 12:05:30 +00:00
|
|
|
GetChars( aFootprintName ) ) );
|
2012-09-26 15:36:48 +00:00
|
|
|
}
|
2012-02-11 09:04:26 +00:00
|
|
|
|
2017-06-10 12:05:30 +00:00
|
|
|
component->SetFPID( fpid );
|
2012-02-11 09:04:26 +00:00
|
|
|
|
2017-06-10 12:05:30 +00:00
|
|
|
// create the new component description
|
|
|
|
wxString description = wxString::Format( CMP_FORMAT, aIndex + 1,
|
|
|
|
GetChars( component->GetReference() ),
|
|
|
|
GetChars( component->GetValue() ),
|
|
|
|
GetChars( FROM_UTF8( component->GetFPID().Format().c_str() ) ) );
|
2012-02-11 09:04:26 +00:00
|
|
|
|
2017-06-10 12:05:30 +00:00
|
|
|
// If the component hasn't had a footprint associated with it
|
|
|
|
// it now has, so we decrement the count of components without
|
|
|
|
// a footprint assigned.
|
|
|
|
if( !hasFootprint )
|
|
|
|
m_undefinedComponentCnt -= 1;
|
|
|
|
|
|
|
|
// Set the new description and deselect the processed component
|
|
|
|
m_compListBox->SetString( aIndex, description );
|
|
|
|
|
|
|
|
// Mark this "session" as modified
|
|
|
|
m_modified = true;
|
2012-02-11 09:04:26 +00:00
|
|
|
|
2012-09-26 17:22:48 +00:00
|
|
|
// update the statusbar
|
|
|
|
DisplayStatus();
|
2012-02-11 09:04:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-11-20 23:35:08 +00:00
|
|
|
/// Return true if the resultant LIB_ID has a certain nickname. The guess
|
2014-04-09 13:33:04 +00:00
|
|
|
/// is only made if this footprint resides in only one library.
|
|
|
|
/// @return int - 0 on success, 1 on not found, 2 on ambiguous i.e. multiple matches
|
2016-11-20 23:35:08 +00:00
|
|
|
static int guessNickname( FP_LIB_TABLE* aTbl, LIB_ID* aFootprintId )
|
2014-04-09 13:33:04 +00:00
|
|
|
{
|
|
|
|
if( aFootprintId->GetLibNickname().size() )
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
wxString nick;
|
2017-07-24 19:02:59 +00:00
|
|
|
wxString fpname = aFootprintId->GetLibItemName();
|
2014-04-09 13:33:04 +00:00
|
|
|
|
|
|
|
std::vector<wxString> nicks = aTbl->GetLogicalLibs();
|
|
|
|
|
|
|
|
// Search each library going through libraries alphabetically.
|
|
|
|
for( unsigned libNdx = 0; libNdx<nicks.size(); ++libNdx )
|
|
|
|
{
|
2017-06-11 20:20:44 +00:00
|
|
|
wxArrayString fpnames;
|
|
|
|
|
|
|
|
aTbl->FootprintEnumerate( fpnames, nicks[libNdx] );
|
2014-04-09 13:33:04 +00:00
|
|
|
|
|
|
|
for( unsigned nameNdx = 0; nameNdx<fpnames.size(); ++nameNdx )
|
|
|
|
{
|
|
|
|
if( fpname == fpnames[nameNdx] )
|
|
|
|
{
|
|
|
|
if( !nick )
|
|
|
|
nick = nicks[libNdx];
|
|
|
|
else
|
|
|
|
return 2; // duplicate, the guess would not be certain
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if( nick.size() )
|
|
|
|
{
|
2017-07-24 19:02:59 +00:00
|
|
|
aFootprintId->SetLibNickname( nick );
|
2014-04-09 13:33:04 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-06-15 09:28:36 +00:00
|
|
|
bool CVPCB_MAINFRAME::ReadNetListAndFpFiles( const std::string& aNetlist )
|
2014-04-09 13:33:04 +00:00
|
|
|
{
|
|
|
|
wxString msg;
|
|
|
|
bool hasMissingNicks = false;
|
|
|
|
|
2015-06-07 18:18:45 +00:00
|
|
|
ReadSchematicNetlist( aNetlist );
|
2014-04-09 13:33:04 +00:00
|
|
|
|
2014-07-05 20:42:59 +00:00
|
|
|
if( m_compListBox == NULL )
|
2014-04-09 13:33:04 +00:00
|
|
|
return false;
|
|
|
|
|
Modular KiCad Blueprint Milestone B), major portions:
*) When kicad.exe closes a project, close any open KIFACEs so that they cannot
get disassociated from their true PROJECT.
*) Allow loading eeschema library editor from kicad.exe
*) Allow loading pcbnew library editor from kicad.exe
*) Rename LIB_COMPONENT to LIB_PART.
*) Add class PART_LIBS, and PART_LIB.
*) Make PART_LIBS non-global, i.e. PROJECT specific.
*) Implement "data on demand" for PART_LIBS
*) Implement "data on demand" for schematic SEARCH_STACK.
*) Use RSTRINGs to retain eeschema editor's notion of last library and part being edited.
*) Get rid of library search on every SCH_COMPONENT::Draw() call, instead use
a weak pointer.
*) Remove all chdir() calls so projects don't need to be CWD.
*) Romove APPEND support from OpenProjectFiles().
*) Make OpenProjectFiles() robust, even for creating new projects.
*) Load EESCHEMA colors in the KIWAY::OnKiwayStart() rather in window open,
and save them in the .eeschema config file, not in the project file.
*) Fix bug with wxDir() while accessing protected dirs in kicad.exe
*) Consolidate template copying into PROJECT class, not in kicad.exe source.
*) Generally untangle eeschema, making its libraries not global but rather
held in the PROJECT.
2014-08-13 20:28:54 +00:00
|
|
|
LoadProjectFile();
|
2018-02-11 17:55:14 +00:00
|
|
|
|
|
|
|
wxSafeYield();
|
|
|
|
|
2014-04-09 13:33:04 +00:00
|
|
|
LoadFootprintFiles();
|
2014-05-09 18:35:48 +00:00
|
|
|
|
2014-04-09 13:33:04 +00:00
|
|
|
BuildFOOTPRINTS_LISTBOX();
|
|
|
|
BuildLIBRARY_LISTBOX();
|
|
|
|
|
2014-07-05 20:42:59 +00:00
|
|
|
m_compListBox->Clear();
|
2014-04-09 13:33:04 +00:00
|
|
|
m_undefinedComponentCnt = 0;
|
|
|
|
|
|
|
|
if( m_netlist.AnyFootprintsLinked() )
|
|
|
|
{
|
|
|
|
for( unsigned i = 0; i < m_netlist.GetCount(); i++ )
|
|
|
|
{
|
|
|
|
COMPONENT* component = m_netlist.GetComponent( i );
|
|
|
|
|
|
|
|
if( component->GetFPID().empty() )
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if( component->GetFPID().IsLegacy() )
|
|
|
|
hasMissingNicks = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check if footprint links were generated before the footprint library table was implemented.
|
|
|
|
if( hasMissingNicks )
|
|
|
|
{
|
2015-03-30 19:34:41 +00:00
|
|
|
msg = _(
|
2014-04-09 13:33:04 +00:00
|
|
|
"Some of the assigned footprints are legacy entries (are missing lib nicknames). "
|
2016-11-20 23:35:08 +00:00
|
|
|
"Would you like CvPcb to attempt to convert them to the new required LIB_ID format? "
|
2014-04-09 13:33:04 +00:00
|
|
|
"(If you answer no, then these assignments will be cleared out and you will "
|
|
|
|
"have to re-assign these footprints yourself.)"
|
|
|
|
);
|
|
|
|
|
|
|
|
if( IsOK( this, msg ) )
|
|
|
|
{
|
|
|
|
msg.Clear();
|
|
|
|
|
2014-04-10 21:20:01 +00:00
|
|
|
try
|
2014-04-09 13:33:04 +00:00
|
|
|
{
|
2014-04-10 21:20:01 +00:00
|
|
|
for( unsigned i = 0; i < m_netlist.GetCount(); i++ )
|
2014-04-09 13:33:04 +00:00
|
|
|
{
|
2014-04-10 21:20:01 +00:00
|
|
|
COMPONENT* component = m_netlist.GetComponent( i );
|
2014-04-09 13:33:04 +00:00
|
|
|
|
2014-04-10 21:20:01 +00:00
|
|
|
if( component->GetFPID().IsLegacy() )
|
2014-04-09 13:33:04 +00:00
|
|
|
{
|
2014-05-09 18:35:48 +00:00
|
|
|
// get this first here, it's possibly obsoleted if we get it too soon.
|
2017-03-23 00:59:25 +00:00
|
|
|
FP_LIB_TABLE* tbl = Prj().PcbFootprintLibs( Kiway() );
|
2014-05-09 18:35:48 +00:00
|
|
|
|
2016-11-20 23:35:08 +00:00
|
|
|
int guess = guessNickname( tbl, (LIB_ID*) &component->GetFPID() );
|
2014-04-10 21:20:01 +00:00
|
|
|
|
|
|
|
switch( guess )
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
DBG(printf("%s: guessed OK ref:%s fpid:%s\n", __func__,
|
|
|
|
TO_UTF8( component->GetReference() ), component->GetFPID().Format().c_str() );)
|
|
|
|
m_modified = true;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 1:
|
|
|
|
msg += wxString::Format( _(
|
2017-12-15 11:37:46 +00:00
|
|
|
"Component \"%s\" footprint \"%s\" was <b>not found</b> in any library.\n" ),
|
2014-04-10 21:20:01 +00:00
|
|
|
GetChars( component->GetReference() ),
|
2017-07-24 19:02:59 +00:00
|
|
|
GetChars( component->GetFPID().GetLibItemName() )
|
2014-04-10 21:20:01 +00:00
|
|
|
);
|
|
|
|
break;
|
2014-04-09 13:33:04 +00:00
|
|
|
|
2014-04-10 21:20:01 +00:00
|
|
|
case 2:
|
|
|
|
msg += wxString::Format( _(
|
2017-12-15 11:37:46 +00:00
|
|
|
"Component \"%s\" footprint \"%s\" was found in <b>multiple</b> libraries.\n" ),
|
2014-04-10 21:20:01 +00:00
|
|
|
GetChars( component->GetReference() ),
|
2017-07-24 19:02:59 +00:00
|
|
|
GetChars( component->GetFPID().GetLibItemName() )
|
2014-04-10 21:20:01 +00:00
|
|
|
);
|
|
|
|
break;
|
|
|
|
}
|
2014-04-09 13:33:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-04-10 21:20:01 +00:00
|
|
|
catch( const IO_ERROR& ioe )
|
|
|
|
{
|
2016-09-14 22:36:45 +00:00
|
|
|
msg = ioe.What();
|
2014-04-10 21:20:01 +00:00
|
|
|
msg += wxT( "\n\n" );
|
2015-04-07 18:44:51 +00:00
|
|
|
msg += _( "First check your footprint library table entries." );
|
2014-04-10 21:20:01 +00:00
|
|
|
|
2015-04-07 18:44:51 +00:00
|
|
|
wxMessageBox( msg, _( "Problematic Footprint Library Tables" ) );
|
2014-04-10 21:20:01 +00:00
|
|
|
return false;
|
|
|
|
}
|
2014-04-09 13:33:04 +00:00
|
|
|
|
|
|
|
if( msg.size() )
|
|
|
|
{
|
|
|
|
HTML_MESSAGE_BOX dlg( this, wxEmptyString );
|
|
|
|
|
2015-04-07 18:44:51 +00:00
|
|
|
dlg.MessageSet( _( "The following errors occurred attempting to convert the "
|
|
|
|
"footprint assignments:\n\n" ) );
|
2014-04-09 13:33:04 +00:00
|
|
|
dlg.ListSet( msg );
|
2015-04-07 18:44:51 +00:00
|
|
|
dlg.MessageSet( _( "\nYou will need to reassign them manually if you want them "
|
|
|
|
"to be updated correctly the next time you import the "
|
|
|
|
"netlist in Pcbnew." ) );
|
2014-04-10 21:20:01 +00:00
|
|
|
|
|
|
|
#if 1
|
2014-04-09 13:33:04 +00:00
|
|
|
dlg.ShowModal();
|
2014-04-10 21:20:01 +00:00
|
|
|
#else
|
|
|
|
dlg.Fit();
|
|
|
|
dlg.Show( true ); // modeless lets user watch while fixing the problems, but its not working.
|
|
|
|
#endif
|
2014-04-09 13:33:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Clear the legacy footprint assignments.
|
|
|
|
for( unsigned i = 0; i < m_netlist.GetCount(); i++ )
|
|
|
|
{
|
|
|
|
COMPONENT* component = m_netlist.GetComponent( i );
|
|
|
|
|
|
|
|
if( component->GetFPID().IsLegacy() )
|
|
|
|
{
|
2016-11-20 23:35:08 +00:00
|
|
|
component->SetFPID( LIB_ID() /* empty */ );
|
2014-04-09 13:33:04 +00:00
|
|
|
m_modified = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-10-28 15:15:39 +00:00
|
|
|
|
|
|
|
// Display a dialog to select footprint selection, if the netlist
|
|
|
|
// and the .cmp file give 2 different valid footprints
|
|
|
|
std::vector <int > m_indexes; // indexes of footprints in netlist
|
|
|
|
|
|
|
|
for( unsigned ii = 0; ii < m_netlist.GetCount(); ii++ )
|
|
|
|
{
|
|
|
|
COMPONENT* component = m_netlist.GetComponent( ii );
|
|
|
|
|
|
|
|
if( component->GetAltFPID().empty() )
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if( component->GetFPID().IsLegacy() || component->GetAltFPID().IsLegacy())
|
|
|
|
continue;
|
|
|
|
|
2015-01-17 08:01:16 +00:00
|
|
|
m_indexes.push_back( ii );
|
2014-10-28 15:15:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// If a n assignment conflict is found,
|
|
|
|
// open a dialog to chose between schematic assignment
|
|
|
|
// and .cmp file assignment:
|
|
|
|
if( m_indexes.size() > 0 )
|
|
|
|
{
|
|
|
|
DIALOG_FP_CONFLICT_ASSIGNMENT_SELECTOR dlg( this );
|
|
|
|
|
|
|
|
for( unsigned ii = 0; ii < m_indexes.size(); ii++ )
|
|
|
|
{
|
|
|
|
COMPONENT* component = m_netlist.GetComponent( m_indexes[ii] );
|
|
|
|
|
2017-07-24 19:02:59 +00:00
|
|
|
wxString cmpfpid = component->GetFPID().Format();
|
|
|
|
wxString schfpid = component->GetAltFPID().Format();
|
2014-10-28 15:15:39 +00:00
|
|
|
|
|
|
|
dlg.Add( component->GetReference(), schfpid, cmpfpid );
|
|
|
|
}
|
|
|
|
|
|
|
|
if( dlg.ShowModal() == wxID_OK )
|
|
|
|
{
|
|
|
|
|
|
|
|
// Update the fp selection:
|
|
|
|
for( unsigned ii = 0; ii < m_indexes.size(); ii++ )
|
|
|
|
{
|
|
|
|
COMPONENT* component = m_netlist.GetComponent( m_indexes[ii] );
|
|
|
|
|
|
|
|
int choice = dlg.GetSelection( component->GetReference() );
|
|
|
|
|
|
|
|
if( choice == 0 ) // the schematic (alt fpid) is chosen:
|
|
|
|
component->SetFPID( component->GetAltFPID() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Populates the component list box:
|
2014-04-09 13:33:04 +00:00
|
|
|
for( unsigned i = 0; i < m_netlist.GetCount(); i++ )
|
|
|
|
{
|
|
|
|
COMPONENT* component = m_netlist.GetComponent( i );
|
|
|
|
|
2014-07-05 20:42:59 +00:00
|
|
|
msg.Printf( CMP_FORMAT, m_compListBox->GetCount() + 1,
|
2014-04-09 13:33:04 +00:00
|
|
|
GetChars( component->GetReference() ),
|
|
|
|
GetChars( component->GetValue() ),
|
|
|
|
GetChars( FROM_UTF8( component->GetFPID().Format().c_str() ) ) );
|
|
|
|
|
2014-07-05 20:42:59 +00:00
|
|
|
m_compListBox->AppendLine( msg );
|
2014-04-09 13:33:04 +00:00
|
|
|
|
|
|
|
if( component->GetFPID().empty() )
|
|
|
|
{
|
|
|
|
m_undefinedComponentCnt += 1;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if( !m_netlist.IsEmpty() )
|
2014-07-05 20:42:59 +00:00
|
|
|
m_compListBox->SetSelection( 0, true );
|
2014-04-09 13:33:04 +00:00
|
|
|
|
|
|
|
DisplayStatus();
|
|
|
|
|
|
|
|
UpdateTitle();
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-02-25 09:52:29 +00:00
|
|
|
void CVPCB_MAINFRAME::SaveFootprintAssociation()
|
2012-02-11 09:04:26 +00:00
|
|
|
{
|
2015-06-07 18:18:45 +00:00
|
|
|
STRING_FORMATTER sf;
|
2012-02-11 09:04:26 +00:00
|
|
|
|
2015-06-07 18:18:45 +00:00
|
|
|
m_netlist.FormatBackAnnotation( &sf );
|
2012-02-11 09:04:26 +00:00
|
|
|
|
2015-06-07 18:18:45 +00:00
|
|
|
Kiway().ExpressMail( FRAME_SCH, MAIL_BACKANNOTATE_FOOTPRINTS, sf.GetString() );
|
2012-02-11 09:04:26 +00:00
|
|
|
|
2016-02-25 09:52:29 +00:00
|
|
|
SetStatusText( _("Footprint association sent to Eeschema") );
|
2012-02-11 09:04:26 +00:00
|
|
|
}
|