kicad/cvpcb/cvframe.cpp

613 lines
17 KiB
C++
Raw Normal View History

2007-12-04 18:23:38 +00:00
/*********************/
/* File: cvframe.cpp */
/*********************/
2007-05-06 16:03:28 +00:00
#include "fctsys.h"
#include "appl_wxstruct.h"
2007-05-06 16:03:28 +00:00
#include "common.h"
#include "confirm.h"
#include "eda_doc.h"
#include "gestfich.h"
#include "id.h"
2007-05-06 16:03:28 +00:00
#include <wx/fontdlg.h>
#include "3d_viewer.h"
2007-05-06 16:03:28 +00:00
#include "cvpcb.h"
#include "pcbnew.h"
#include "bitmaps.h"
#include "protos.h"
#include "cvstruct.h"
2007-05-06 16:03:28 +00:00
#define FRAME_MIN_SIZE_X 450
#define FRAME_MIN_SIZE_Y 300
2007-12-04 18:23:38 +00:00
/*******************************************************/
/* Constructeur de WinEDA_CvpcbFrame: la fenetre generale */
/*******************************************************/
WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, long style ) :
WinEDA_BasicFrame( NULL, CVPCB_FRAME, title, wxDefaultPosition,
wxDefaultSize, style )
2007-05-06 16:03:28 +00:00
{
m_FrameName = wxT( "CvpcbFrame" );
2008-08-15 16:38:05 +00:00
//m_AboutTitle = g_CvpcbAboutTitle;
m_ListCmp = NULL;
2007-12-04 18:23:38 +00:00
m_FootprintList = NULL;
DrawFrame = NULL;
m_HToolBar = NULL;
// Give an icon
#ifdef __WINDOWS__
SetIcon( wxICON( a_icon_cvpcb ) );
#else
SetIcon( wxICON( icon_cvpcb ) );
#endif
SetFont( *g_StdFont );
SetAutoLayout( TRUE );
GetSettings();
if( m_FrameSize.x < FRAME_MIN_SIZE_X )
m_FrameSize.x = FRAME_MIN_SIZE_X;
if( m_FrameSize.y < FRAME_MIN_SIZE_Y )
m_FrameSize.y = FRAME_MIN_SIZE_Y;
// create the status bar
int dims[3] = { -1, -1, 250 };
CreateStatusBar( 3 );
SetStatusWidths( 3, dims );
ReCreateMenuBar();
2007-05-06 16:03:28 +00:00
ReCreateHToolbar();
2007-12-04 18:23:38 +00:00
// Creation des listes de modules disponibles et des composants du schema
// Create child subwindows.
BuildCmpListBox();
BuildFootprintListBox();
/* Creation des contraintes de dimension de la fenetre d'affichage des composants
* du schema */
wxLayoutConstraints* linkpos = new wxLayoutConstraints;
linkpos->top.SameAs( this, wxTop );
linkpos->bottom.SameAs( this, wxBottom );
linkpos->left.SameAs( this, wxLeft );
linkpos->width.PercentOf( this, wxWidth, 66 );
if( m_ListCmp )
m_ListCmp->SetConstraints( linkpos );
/* Creation des contraintes de dimension de la fenetre d'affichage des modules
* de la librairie */
linkpos = new wxLayoutConstraints;
linkpos->top.SameAs( m_ListCmp, wxTop );
linkpos->bottom.SameAs( m_ListCmp, wxBottom );
linkpos->right.SameAs( this, wxRight );
linkpos->left.SameAs( m_ListCmp, wxRight );
if( m_FootprintList )
m_FootprintList->SetConstraints( linkpos );
2008-10-26 12:11:11 +00:00
// Set minimal frame width and height
SetSizeHints( FRAME_MIN_SIZE_X,
FRAME_MIN_SIZE_Y, -1, -1, -1, -1 );
// Framesize and position
SetSize( m_FramePos.x,
m_FramePos.y,
m_FrameSize.x,
m_FrameSize.y );
2007-05-06 16:03:28 +00:00
}
/******************************************/
WinEDA_CvpcbFrame::~WinEDA_CvpcbFrame()
/******************************************/
{
wxConfig* config = wxGetApp().m_EDA_Config;
if( config )
2007-12-04 18:23:38 +00:00
{
int state = m_HToolBar->GetToolState(
ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST );
config->Write( wxT( FILTERFOOTPRINTKEY ), state );
2007-12-04 18:23:38 +00:00
}
2007-05-06 16:03:28 +00:00
}
2007-12-04 18:23:38 +00:00
2007-05-06 16:03:28 +00:00
/************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::OnSize( wxSizeEvent& event )
2007-05-06 16:03:28 +00:00
/************************************************/
{
2007-12-04 18:23:38 +00:00
event.Skip();
2007-05-06 16:03:28 +00:00
}
2007-12-04 18:23:38 +00:00
2008-10-26 12:11:11 +00:00
/*************************************/
/* Event table for WinEDA_CvpcbFrame */
/*************************************/
2007-12-04 18:23:38 +00:00
BEGIN_EVENT_TABLE( WinEDA_CvpcbFrame, wxFrame )
EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, WinEDA_CvpcbFrame::LoadNetList )
2007-12-04 18:23:38 +00:00
2008-10-26 12:11:11 +00:00
// Menu events
EVT_MENU( ID_LOAD_PROJECT,
WinEDA_CvpcbFrame::LoadNetList )
EVT_MENU( ID_SAVE_PROJECT,
WinEDA_CvpcbFrame::SaveQuitCvpcb )
EVT_MENU( ID_CVPCB_QUIT,
WinEDA_CvpcbFrame::OnQuit )
EVT_MENU( ID_CVPCB_DISPLAY_HELP,
WinEDA_CvpcbFrame::GetKicadHelp )
EVT_MENU( ID_CVPCB_DISPLAY_LICENCE,
WinEDA_CvpcbFrame::GetKicadAbout )
EVT_MENU( ID_CONFIG_REQ,
WinEDA_CvpcbFrame::ConfigCvpcb )
EVT_MENU( ID_CONFIG_SAVE,
WinEDA_CvpcbFrame::Update_Config )
EVT_MENU_RANGE( ID_PREFERENCES_FONT_INFOSCREEN,
ID_PREFERENCES_FONT_END,
WinEDA_CvpcbFrame::ProcessFontPreferences )
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE,
ID_LANGUAGE_CHOICE_END,
WinEDA_CvpcbFrame::SetLanguage )
2007-12-04 18:23:38 +00:00
2008-10-26 12:11:11 +00:00
// Toolbar events
EVT_TOOL( ID_CVPCB_QUIT,
WinEDA_CvpcbFrame::OnQuit )
EVT_TOOL( ID_CVPCB_READ_INPUT_NETLIST,
WinEDA_CvpcbFrame::LoadNetList )
EVT_TOOL( ID_CVPCB_SAVEQUITCVPCB,
WinEDA_CvpcbFrame::SaveQuitCvpcb )
EVT_TOOL( ID_CVPCB_CREATE_CONFIGWINDOW,
WinEDA_CvpcbFrame::ConfigCvpcb )
EVT_TOOL( ID_CVPCB_CREATE_SCREENCMP,
WinEDA_CvpcbFrame::DisplayModule )
EVT_TOOL( ID_CVPCB_GOTO_FIRSTNA,
WinEDA_CvpcbFrame::ToFirstNA )
EVT_TOOL( ID_CVPCB_GOTO_PREVIOUSNA,
WinEDA_CvpcbFrame::ToPreviousNA )
EVT_TOOL( ID_CVPCB_DEL_ASSOCIATIONS,
WinEDA_CvpcbFrame::DelAssociations )
EVT_TOOL( ID_CVPCB_AUTO_ASSOCIE,
WinEDA_CvpcbFrame::AssocieModule )
EVT_TOOL( ID_CVPCB_CREATE_STUFF_FILE,
WinEDA_CvpcbFrame::WriteStuffList )
EVT_TOOL( ID_PCB_DISPLAY_FOOTPRINT_DOC,
WinEDA_CvpcbFrame::DisplayDocFile )
EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST,
WinEDA_CvpcbFrame::OnSelectFilteringFootprint )
EVT_TOOL( ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST,
WinEDA_CvpcbFrame::OnSelectFilteringFootprint )
2008-10-26 12:11:11 +00:00
// Frame events
EVT_CHAR_HOOK( WinEDA_CvpcbFrame::OnChar )
EVT_CLOSE( WinEDA_CvpcbFrame::OnCloseWindow )
EVT_SIZE( WinEDA_CvpcbFrame::OnSize )
2007-12-04 18:23:38 +00:00
2008-10-26 12:11:11 +00:00
// List item events
EVT_LIST_ITEM_SELECTED( ID_CVPCB_FOOTPRINT_LIST,
WinEDA_CvpcbFrame::OnLeftClick )
EVT_LIST_ITEM_ACTIVATED( ID_CVPCB_FOOTPRINT_LIST,
WinEDA_CvpcbFrame::OnLeftDClick )
EVT_LIST_ITEM_SELECTED( ID_CVPCB_COMPONENT_LIST,
WinEDA_CvpcbFrame::OnSelectComponent )
2007-05-06 16:03:28 +00:00
END_EVENT_TABLE()
2008-10-26 12:11:11 +00:00
/******************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::OnQuit( wxCommandEvent& event )
2008-10-26 12:11:11 +00:00
/******************************************************/
2007-05-06 16:03:28 +00:00
{
Close( TRUE );
2007-05-06 16:03:28 +00:00
}
2007-12-04 18:23:38 +00:00
2007-05-06 16:03:28 +00:00
/**********************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::OnCloseWindow( wxCloseEvent& Event )
2007-05-06 16:03:28 +00:00
/**********************************************************/
{
2007-12-04 18:23:38 +00:00
int diag;
if( modified )
{
unsigned ii;
wxMessageDialog dialog( this,
_( "Net and component list modified.\n Save before exit ?" ),
_( "Confirmation" ),
wxYES_NO | wxCANCEL | wxICON_EXCLAMATION | wxYES_DEFAULT );
2007-12-04 18:23:38 +00:00
ii = dialog.ShowModal();
switch( ii )
{
case wxID_CANCEL:
Event.Veto();
return;
case wxID_NO:
break;
case wxID_OK:
case wxID_YES:
diag = SaveNetList( wxEmptyString );
if( diag > 0 )
modified = 0;
else if( diag == 0 )
{
if( !IsOK( this,
_( "Problem when saving files, exit anyway ?" ) ) )
2007-12-04 18:23:38 +00:00
{
2008-10-29 23:57:35 +00:00
Event.Veto();
2008-10-26 12:11:11 +00:00
return;
2007-12-04 18:23:38 +00:00
}
}
break;
}
}
// Close the help frame
if( wxGetApp().m_HtmlCtrl )
2007-12-04 18:23:38 +00:00
{
if( wxGetApp().m_HtmlCtrl->GetFrame() ) // returns NULL if no help frame active
wxGetApp().m_HtmlCtrl->GetFrame()->Close( TRUE );
2007-12-04 18:23:38 +00:00
}
if( !NetInNameBuffer.IsEmpty() )
{
SetLastProject( NetInNameBuffer );
}
FreeMemoryModules();
FreeMemoryComponents();
2007-12-04 18:23:38 +00:00
modified = 0;
SaveSettings();
Destroy();
return;
2007-05-06 16:03:28 +00:00
}
/************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::OnChar( wxKeyEvent& event )
2007-05-06 16:03:28 +00:00
/************************************************/
{
2007-12-04 18:23:38 +00:00
event.Skip();
2007-05-06 16:03:28 +00:00
}
/*******************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::ToFirstNA( wxCommandEvent& event )
2007-05-06 16:03:28 +00:00
/*******************************************************/
{
2007-12-04 18:23:38 +00:00
STORECMP* Composant;
int ii, selection;;
Composant = g_BaseListeCmp;
selection = m_ListCmp->GetSelection();
if( selection < 0 )
selection = 0;
2008-10-29 23:57:35 +00:00
2007-12-04 18:23:38 +00:00
for( ii = 0; Composant != NULL; Composant = Composant->Pnext )
{
if( Composant->m_Module.IsEmpty() && (ii > selection) )
break;
ii++;
}
if( Composant == NULL )
{
wxBell(); ii = selection;
}
if( g_BaseListeCmp )
m_ListCmp->SetSelection( ii );
2007-05-06 16:03:28 +00:00
}
2007-12-04 18:23:38 +00:00
2007-05-06 16:03:28 +00:00
/**********************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::ToPreviousNA( wxCommandEvent& event )
2007-05-06 16:03:28 +00:00
/**********************************************************/
{
2007-12-04 18:23:38 +00:00
STORECMP* Composant;
int ii, selection;
Composant = g_BaseListeCmp;
selection = m_ListCmp->GetSelection();
if( selection < 0 )
selection = 0;
for( ii = 0; Composant != NULL; Composant = Composant->Pnext )
{
if( ii == selection )
break;
ii++;
}
for( ; Composant != NULL; Composant = Composant->Pback )
{
if( Composant->m_Module.IsEmpty() && (ii != selection) )
break;
ii--;
}
if( Composant == NULL )
{
wxBell(); ii = selection;
}
if( g_BaseListeCmp )
m_ListCmp->SetSelection( ii );
2007-05-06 16:03:28 +00:00
}
/**********************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::SaveQuitCvpcb( wxCommandEvent& event )
2007-05-06 16:03:28 +00:00
/**********************************************************/
{
2007-12-04 18:23:38 +00:00
if( SaveNetList( wxEmptyString ) > 0 )
{
modified = 0;
Close( TRUE );
}
2007-05-06 16:03:28 +00:00
}
2007-12-04 18:23:38 +00:00
2007-05-06 16:03:28 +00:00
/*************************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::DelAssociations( wxCommandEvent& event )
2007-05-06 16:03:28 +00:00
/*************************************************************/
2007-12-04 18:23:38 +00:00
2007-05-06 16:03:28 +00:00
/* Supprime toutes les associations deja faites
2007-12-04 18:23:38 +00:00
*/
2007-05-06 16:03:28 +00:00
{
2007-12-04 18:23:38 +00:00
int ii;
STORECMP* Composant;
wxString Line;
if( IsOK( this, _( "Delete selections" ) ) )
{
Composant = g_BaseListeCmp;
for( ii = 0; Composant != NULL; Composant = Composant->Pnext, ii++ )
{
Composant->m_Module.Empty();
m_ListCmp->SetSelection( ii );
SetNewPkg( wxEmptyString );
}
m_ListCmp->SetSelection( 0 );
composants_non_affectes = nbcomp;
}
Line.Printf( _( "Components: %d (free: %d)" ), nbcomp,
composants_non_affectes );
2007-12-04 18:23:38 +00:00
SetStatusText( Line, 1 );
2007-05-06 16:03:28 +00:00
}
/***********************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::LoadNetList( wxCommandEvent& event )
2007-05-06 16:03:28 +00:00
/***********************************************************/
2007-12-04 18:23:38 +00:00
/* Called when click on Load Netlist button or by menu files
* Read a netlist slected by user
2007-12-04 18:23:38 +00:00
*/
2007-05-06 16:03:28 +00:00
{
2007-12-04 18:23:38 +00:00
bool newfile;
wxString oldfilename;
wxString fullfilename;
int id = event.GetId();
// Get a filename from history. if fullfilename is void,
// a name will be asked to user, later.
if ( id >= wxID_FILE1 && id <= wxID_FILE9 ) // Called by clicking on an old filename in file history
fullfilename = GetFileFromHistory( event.GetId(), _( "Netlist" ) );
2007-12-04 18:23:38 +00:00
if( !NetInNameBuffer.IsEmpty() )
{
oldfilename = NetInNameBuffer;
}
// Read the file fullfilename. If fullfilename is void,
// The user will be prompted for a filename.
// newfile = true if a file is read.
newfile = ReadInputNetList( fullfilename );
2007-12-04 18:23:38 +00:00
if( newfile && !oldfilename.IsEmpty() )
{
SetLastProject( NetInNameBuffer );
2007-12-04 18:23:38 +00:00
}
ReCreateMenuBar();
2007-05-06 16:03:28 +00:00
}
/***********************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::ConfigCvpcb( wxCommandEvent& event )
2007-05-06 16:03:28 +00:00
/***********************************************************/
2007-12-04 18:23:38 +00:00
2007-05-06 16:03:28 +00:00
/* Fonction liee au boutton "Config"
2007-12-04 18:23:38 +00:00
* Affiche le panneau de configuration
*/
2007-05-06 16:03:28 +00:00
{
2007-12-04 18:23:38 +00:00
CreateConfigWindow();
2007-05-06 16:03:28 +00:00
}
2007-12-04 18:23:38 +00:00
2007-05-06 16:03:28 +00:00
/************************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::DisplayModule( wxCommandEvent& event )
2007-05-06 16:03:28 +00:00
/************************************************************/
2007-12-04 18:23:38 +00:00
2007-05-06 16:03:28 +00:00
/* Fonction liee au boutton "Visu"
2007-12-04 18:23:38 +00:00
* Affiche l'ecran de visualisation des modules
*/
2007-05-06 16:03:28 +00:00
{
2007-12-04 18:23:38 +00:00
CreateScreenCmp();
DrawFrame->AdjustScrollBars();
DrawFrame->Recadre_Trace( FALSE );
2007-05-06 16:03:28 +00:00
}
/****************************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::AddFontSelectionMenu( wxMenu* main_menu )
2007-05-06 16:03:28 +00:00
/*****************************************************************/
2007-12-04 18:23:38 +00:00
2007-05-06 16:03:28 +00:00
/* create the submenu for fonte selection and setup fonte size
2007-12-04 18:23:38 +00:00
*/
2007-05-06 16:03:28 +00:00
{
2007-12-04 18:23:38 +00:00
wxMenu* fontmenu = new wxMenu();
ADD_MENUITEM( fontmenu,
ID_PREFERENCES_FONT_DIALOG,
_( "Dialog boxes" ),
2007-12-04 18:23:38 +00:00
fonts_xpm );
2008-10-29 23:57:35 +00:00
ADD_MENUITEM( fontmenu,
ID_PREFERENCES_FONT_INFOSCREEN,
_( "Lists" ),
2007-12-04 18:23:38 +00:00
fonts_xpm );
ADD_MENUITEM( fontmenu,
ID_PREFERENCES_FONT_STATUS,
_( "Status box" ),
2007-12-04 18:23:38 +00:00
fonts_xpm );
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( main_menu,
fontmenu,
ID_PREFERENCES_FONT,
_( "&Font" ),
2008-10-26 12:11:11 +00:00
_( "Choose font type and size for dialogs, information and status box" ),
2007-12-04 18:23:38 +00:00
fonts_xpm );
2007-05-06 16:03:28 +00:00
}
/********************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::SetLanguage( wxCommandEvent& event )
2007-05-06 16:03:28 +00:00
/********************************************************/
{
2007-12-04 18:23:38 +00:00
int id = event.GetId();
2007-05-06 16:03:28 +00:00
wxGetApp().SetLanguageIdentifier( id );
wxGetApp().SetLanguage();
2007-05-06 16:03:28 +00:00
}
2007-12-04 18:23:38 +00:00
2007-05-06 16:03:28 +00:00
/*************************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::DisplayDocFile( wxCommandEvent& event )
2007-05-06 16:03:28 +00:00
/*************************************************************/
{
wxString DocModuleFileName, fullfilename;
2007-12-04 18:23:38 +00:00
DocModuleFileName = wxGetApp().m_EDA_CommonConfig->Read(
DOC_FOOTPRINTS_LIST_KEY,
DEFAULT_FOOTPRINTS_LIST_FILENAME );
if( wxIsAbsolutePath( DocModuleFileName ) )
fullfilename = DocModuleFileName;
else
fullfilename = FindKicadHelpPath() + wxT( "../" ) + DocModuleFileName;
GetAssociatedDocument( this, wxEmptyString, fullfilename );
2007-05-06 16:03:28 +00:00
}
2007-12-04 18:23:38 +00:00
2007-05-06 16:03:28 +00:00
/********************************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::ProcessFontPreferences( wxCommandEvent& event )
2007-05-06 16:03:28 +00:00
/********************************************************************/
{
2007-12-04 18:23:38 +00:00
int id = event.GetId();
wxFont font;
switch( id )
{
2008-10-29 23:57:35 +00:00
case ID_PREFERENCES_FONT:
case ID_PREFERENCES_FONT_DIALOG:
case ID_PREFERENCES_FONT_STATUS:
2007-12-04 18:23:38 +00:00
WinEDA_BasicFrame::ProcessFontPreferences( id );
2008-10-29 23:57:35 +00:00
break;
2007-12-04 18:23:38 +00:00
case ID_PREFERENCES_FONT_INFOSCREEN:
2008-10-29 23:57:35 +00:00
font = wxGetFontFromUser( this, *g_FixedFont );
if( font.Ok() )
{
int pointsize = font.GetPointSize();
*g_FixedFont = font;
g_FixedFontPointSize = pointsize;
m_FootprintList->SetFont( *g_FixedFont );
m_ListCmp->SetFont( *g_FixedFont );
}
break;
2007-12-04 18:23:38 +00:00
default:
DisplayError( this,
wxT( "WinEDA_DrawFrame::ProcessFontPreferences Internal Error" ) );
2007-12-04 18:23:38 +00:00
break;
}
2007-05-06 16:03:28 +00:00
}
2007-12-04 18:23:38 +00:00
2007-05-06 16:03:28 +00:00
/******************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::OnLeftClick( wxListEvent& event )
2007-05-06 16:03:28 +00:00
/******************************************************/
{
2007-12-04 18:23:38 +00:00
m_FootprintList->OnLeftClick( event );
}
2007-12-04 18:23:38 +00:00
2007-05-06 16:03:28 +00:00
/******************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::OnLeftDClick( wxListEvent& event )
2007-05-06 16:03:28 +00:00
/******************************************************/
{
2007-12-04 18:23:38 +00:00
m_FootprintList->OnLeftDClick( event );
}
2007-05-06 16:03:28 +00:00
2007-12-04 18:23:38 +00:00
2007-05-06 16:03:28 +00:00
/*************************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::OnSelectComponent( wxListEvent& event )
2007-05-06 16:03:28 +00:00
/*************************************************************/
{
2007-12-04 18:23:38 +00:00
STORECMP* Component;
int selection;
if( !m_HToolBar->GetToolState( ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST ) )
{
m_FootprintList->SetActiveFootprintList( TRUE, TRUE );
return;
}
selection = m_ListCmp->GetSelection();
if( selection < 0 )
{
m_FootprintList->SetActiveFootprintList( TRUE, TRUE );
return;
}
Component = g_BaseListeCmp;
for( int ii = 0; Component != NULL; Component = Component->Pnext )
{
if( ii == selection )
break;
ii++;
}
if( Component == NULL )
{
m_FootprintList->SetActiveFootprintList( TRUE, TRUE );
return;
}
m_FootprintList->SetFootprintFilteredList( Component );
2007-05-06 16:03:28 +00:00
}
/************************************************************************/
2007-12-04 18:23:38 +00:00
void WinEDA_CvpcbFrame::OnSelectFilteringFootprint( wxCommandEvent& event )
/************************************************************************/
2007-12-04 18:23:38 +00:00
/* Select full/filtered footprint display on tool click
2007-12-04 18:23:38 +00:00
*/
{
2007-12-04 18:23:38 +00:00
wxListEvent l_event;
2007-12-04 18:23:38 +00:00
OnSelectComponent( l_event );
}