Commit b9ba67c8 authored by charras's avatar charras

Pcbnew: Fixed: fully broken netlist import from eeschema when using time stamp...

Pcbnew: Fixed: fully broken netlist import from eeschema when using time stamp (fully broken also in stable version).
parent aa51c05d
......@@ -4,6 +4,13 @@ KiCad ChangeLog 2009
Please add newer entries at the top, list the date and your name with
email address.
2009-apr-24 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++Pcbnew:
Fixed: fully broken netlist import from eeschema when using time stamp.
(normal operation worked fine)
Added: alawys print diags in dialog window when reading a netlist
2009-apr-17 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++ALL:
......
......@@ -14,7 +14,6 @@ LIBVIEWER3D = ../3d-viewer/3d-viewer.a
OBJECTS = $(TARGET).o \
class_cvpcb.o\
class_board_item.o\
memoire.o \
cvframe.o\
dialog_cvpcb_config.o\
dialog_cvpcb_config_fbp.o\
......@@ -48,21 +47,11 @@ displayframe.o: displayframe.cpp
listboxes.o: listboxes.cpp
drawframe.o: ../share/drawframe.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../share/$*.cpp
init.o: init.cpp
memoire.o: memoire.cpp
rdpcad.o: rdpcad.cpp
class_board_item.o: ../pcbnew/class_board_item.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_board.o: ../pcbnew/class_board.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_drawsegment.o: ../pcbnew/class_drawsegment.cpp ../pcbnew/class_drawsegment.h
$(CXX) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
......@@ -83,10 +72,6 @@ class_equipot.o: ../pcbnew/class_equipot.cpp
readschematicnetlist.o: readschematicnetlist.cpp
viewlogi.o: viewlogi.cpp
viewlnet.o: viewlnet.cpp
loadcmp.o: loadcmp.cpp
savecmp.o: savecmp.cpp
......@@ -100,7 +85,7 @@ ioascii.o: ../pcbnew/ioascii.cpp
listlib.o: listlib.cpp
cfg.o: cfg.cpp cfg.h
cfg.o: cfg.cpp
menucfg.o: menucfg.cpp dialog_cvpcb_config.cpp dialog_cvpcb_config.h
......
......@@ -46,7 +46,8 @@ set(PCBNEW_SRCS
dialog_graphic_item_properties.cpp
dialog_graphic_item_properties_base.cpp
# dialog_initpcb.cpp
# dialog_netlist.cpp
dialog_netlist.cpp
dialog_netlist_fbp.cpp
dialog_pcb_text_properties.cpp
zones_non_copper_type_functions.cpp
dialog_non_copper_zones_properties_base.cpp
......
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_netlist.h
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Created: 26/02/2006 17:42:19
// RCS-ID:
// Copyright: License GNU
// Licence:
/// Author: jean-pierre Charras
// Licence: GPL
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 26/02/2006 17:42:19
......@@ -15,132 +9,29 @@
#ifndef _DIALOG_NETLIST_H_
#define _DIALOG_NETLIST_H_
/*!
* Includes
*/
////@begin includes
#include "wx/valgen.h"
#include "wx/statline.h"
////@end includes
/*!
* Forward declarations
*/
////@begin forward declarations
class wxStdDialogButtonSizer;
////@end forward declarations
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DIALOG 10000
#define ID_SELECTION_FOOTPRINT_MODE 10005
#define ID_KEEP_OR_CHANGE_FOOTPRINTS 10007
#define ID_DELETE_TRACKS_OPTION 10006
#define ID_DISPLAY_WARNINGS_OPT 10008
#define ID_REMOVE_EXTRA_FOOTPRINTS_OPT 10011
#define ID_OPEN_NELIST 10001
#define ID_READ_NETLIST_FILE 10002
#define ID_TEST_NETLIST 10003
#define ID_COMPILE_RATSNEST 10004
#define ID_TEXT_NETLIST_FILENAME 10012
#define ID_TEXTCTRL 10009
#define ID_STATICLINE 10010
#define SYMBOL_WINEDA_NETLISTFRAME_STYLE wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
#define SYMBOL_WINEDA_NETLISTFRAME_TITLE _("Netlist Dialog")
#define SYMBOL_WINEDA_NETLISTFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_NETLISTFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_NETLISTFRAME_POSITION wxDefaultPosition
////@end control identifiers
#include "dialog_netlist_fbp.h"
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
/*!
* WinEDA_NetlistFrame class declaration
*/
class WinEDA_NetlistFrame: public wxDialog
class DIALOG_NETLIST : public DIALOG_NETLIST_FBP
{
DECLARE_DYNAMIC_CLASS( WinEDA_NetlistFrame )
DECLARE_EVENT_TABLE()
public:
/// Constructors
WinEDA_NetlistFrame();
WinEDA_NetlistFrame(WinEDA_PcbFrame* parent,
wxDC* DC,
const wxString& aNetlistFilename,
wxWindowID id = SYMBOL_WINEDA_NETLISTFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_NETLISTFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_NETLISTFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_NETLISTFRAME_SIZE, long style = SYMBOL_WINEDA_NETLISTFRAME_STYLE );
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_NETLISTFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_NETLISTFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_NETLISTFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_NETLISTFRAME_SIZE, long style = SYMBOL_WINEDA_NETLISTFRAME_STYLE );
/// Destructor
~WinEDA_NetlistFrame();
/// Initialises member variables
void Init();
/// Creates the controls and sizers
void CreateControls();
////@begin WinEDA_NetlistFrame event handler declarations
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_OPEN_NELIST
void OnOpenNelistClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_READ_NETLIST_FILE
void OnReadNetlistFileClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_TEST_NETLIST
void OnTestNetlistClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_COMPILE_RATSNEST
void OnCompileRatsnestClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void OnCancelClick( wxCommandEvent& event );
////@end WinEDA_NetlistFrame event handler declarations
////@begin WinEDA_NetlistFrame member function declarations
private:
WinEDA_PcbFrame * m_Parent;
wxDC * m_DC;
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end WinEDA_NetlistFrame member function declarations
public:
DIALOG_NETLIST( WinEDA_PcbFrame* aParent, wxDC * aDC, const wxString & aNetlistFull_Filename );
~DIALOG_NETLIST() {};
/// Should we show tooltips?
static bool ShowToolTips();
void Init();
// Virtual event handlers, overide them in your derived class
void OnOpenNelistClick( wxCommandEvent& event );
void OnReadNetlistFileClick( wxCommandEvent& event );
void OnTestFootprintsClick( wxCommandEvent& event );
void OnCompileRatsnestClick( wxCommandEvent& event );
void OnCancelClick( wxCommandEvent& event );
////@begin WinEDA_NetlistFrame member variables
wxRadioBox* m_Select_By_Timestamp;
wxRadioBox* m_ChangeExistingFootprintCtrl;
wxRadioBox* m_DeleteBadTracks;
wxCheckBox* m_DisplayWarningCtrl;
wxCheckBox* m_RemoveExtraFootprintsCtrl;
wxButton* m_btClose;
wxTextCtrl* m_NetlistFilenameCtrl;
wxTextCtrl* m_MessageWindow;
wxStdDialogButtonSizer* StdDialogButtonSizer;
////@end WinEDA_NetlistFrame member variables
WinEDA_PcbFrame* m_Parent;
wxDC* m_DC;
};
#endif
// _DIALOG_NETLIST_H_
#endif // _DIALOG_NETLIST_H_
This diff is collapsed.
#include "wx/msw/wx.rc"
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_netlist_fbp.h"
///////////////////////////////////////////////////////////////////////////
DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bUpperSizer;
bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bLeftSizer;
bLeftSizer = new wxBoxSizer( wxVERTICAL );
wxString m_Select_By_TimestampChoices[] = { _("Reference"), _("Timestamp") };
int m_Select_By_TimestampNChoices = sizeof( m_Select_By_TimestampChoices ) / sizeof( wxString );
m_Select_By_Timestamp = new wxRadioBox( this, wxID_ANY, _("Module Selection:"), wxDefaultPosition, wxDefaultSize, m_Select_By_TimestampNChoices, m_Select_By_TimestampChoices, 1, wxRA_SPECIFY_COLS );
m_Select_By_Timestamp->SetSelection( 0 );
m_Select_By_Timestamp->SetToolTip( _("Select how footprints are recognized:\nby their reference (U1, R3...) (normal setting)\nor their time stamp (special setting after a full schematic reannotation)") );
bLeftSizer->Add( m_Select_By_Timestamp, 0, wxALL|wxEXPAND, 5 );
wxString m_ChangeExistingFootprintCtrlChoices[] = { _("Keep"), _("Change") };
int m_ChangeExistingFootprintCtrlNChoices = sizeof( m_ChangeExistingFootprintCtrlChoices ) / sizeof( wxString );
m_ChangeExistingFootprintCtrl = new wxRadioBox( this, wxID_ANY, _("Exchange Module:"), wxDefaultPosition, wxDefaultSize, m_ChangeExistingFootprintCtrlNChoices, m_ChangeExistingFootprintCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_ChangeExistingFootprintCtrl->SetSelection( 0 );
m_ChangeExistingFootprintCtrl->SetToolTip( _("Keep or change an existing footprint when the netlist gives a different footprint") );
bLeftSizer->Add( m_ChangeExistingFootprintCtrl, 0, wxALL|wxEXPAND, 5 );
bUpperSizer->Add( bLeftSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bMiddleSizer;
bMiddleSizer = new wxBoxSizer( wxVERTICAL );
wxString m_DeleteBadTracksChoices[] = { _("Keep"), _("Delete") };
int m_DeleteBadTracksNChoices = sizeof( m_DeleteBadTracksChoices ) / sizeof( wxString );
m_DeleteBadTracks = new wxRadioBox( this, wxID_ANY, _("Bad Tracks Deletion:"), wxDefaultPosition, wxDefaultSize, m_DeleteBadTracksNChoices, m_DeleteBadTracksChoices, 1, wxRA_SPECIFY_COLS );
m_DeleteBadTracks->SetSelection( 0 );
m_DeleteBadTracks->SetToolTip( _("Keep or delete bad tracks after a netlist change") );
bMiddleSizer->Add( m_DeleteBadTracks, 0, wxALL|wxEXPAND, 5 );
wxString m_RemoveExtraFootprintsCtrlChoices[] = { _("Keep"), _("Delete") };
int m_RemoveExtraFootprintsCtrlNChoices = sizeof( m_RemoveExtraFootprintsCtrlChoices ) / sizeof( wxString );
m_RemoveExtraFootprintsCtrl = new wxRadioBox( this, wxID_ANY, _("Extra Footprints"), wxDefaultPosition, wxDefaultSize, m_RemoveExtraFootprintsCtrlNChoices, m_RemoveExtraFootprintsCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_RemoveExtraFootprintsCtrl->SetSelection( 0 );
m_RemoveExtraFootprintsCtrl->SetToolTip( _("Remove footprints found on the Board but not in netlist\nNote: only not locked footprints will be removed") );
bMiddleSizer->Add( m_RemoveExtraFootprintsCtrl, 0, wxALL|wxEXPAND, 5 );
bUpperSizer->Add( bMiddleSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bRightSizerButtons;
bRightSizerButtons = new wxBoxSizer( wxVERTICAL );
m_button1 = new wxButton( this, ID_OPEN_NELIST, _("Browse Netlist Files"), wxDefaultPosition, wxDefaultSize, 0 );
bRightSizerButtons->Add( m_button1, 0, wxALL|wxEXPAND, 5 );
m_button2 = new wxButton( this, ID_READ_NETLIST_FILE, _("Read Current Netlist"), wxDefaultPosition, wxDefaultSize, 0 );
m_button2->SetToolTip( _("Read the current netlist and update connections and connectivity info") );
bRightSizerButtons->Add( m_button2, 0, wxALL|wxEXPAND, 5 );
m_button3 = new wxButton( this, ID_TEST_NETLIST, _("Footprints Test"), wxDefaultPosition, wxDefaultSize, 0 );
m_button3->SetToolTip( _("Read the current neltist file and list missing and extra footprints") );
bRightSizerButtons->Add( m_button3, 0, wxALL|wxEXPAND, 5 );
m_button4 = new wxButton( this, ID_COMPILE_RATSNEST, _("Rebuild Board Connectivity"), wxDefaultPosition, wxDefaultSize, 0 );
m_button4->SetToolTip( _("Rebuild the full ratsnest (usefull after a manual pad netname edition)") );
bRightSizerButtons->Add( m_button4, 0, wxALL|wxEXPAND, 5 );
m_button5 = new wxButton( this, wxID_ANY, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
bRightSizerButtons->Add( m_button5, 0, wxALL|wxEXPAND, 5 );
bUpperSizer->Add( bRightSizerButtons, 0, wxALIGN_CENTER_VERTICAL, 5 );
bMainSizer->Add( bUpperSizer, 1, wxEXPAND, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
m_staticTextNetfilename = new wxStaticText( this, wxID_ANY, _("Netlist File:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextNetfilename->Wrap( -1 );
bMainSizer->Add( m_staticTextNetfilename, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_NetlistFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bMainSizer->Add( m_NetlistFilenameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1->Wrap( -1 );
bMainSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_MessageWindow = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CHARWRAP|wxTE_MULTILINE|wxTE_READONLY|wxTE_WORDWRAP );
bMainSizer->Add( m_MessageWindow, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
this->SetSizer( bMainSizer );
this->Layout();
// Connect Events
m_button1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNelistClick ), NULL, this );
m_button2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this );
m_button3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnTestFootprintsClick ), NULL, this );
m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCompileRatsnestClick ), NULL, this );
m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this );
}
DIALOG_NETLIST_FBP::~DIALOG_NETLIST_FBP()
{
// Disconnect Events
m_button1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNelistClick ), NULL, this );
m_button2->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this );
m_button3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnTestFootprintsClick ), NULL, this );
m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCompileRatsnestClick ), NULL, this );
m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this );
}
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_netlist_fbp__
#define __dialog_netlist_fbp__
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/radiobox.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/button.h>
#include <wx/statline.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_NETLIST_FBP
///////////////////////////////////////////////////////////////////////////////
class DIALOG_NETLIST_FBP : public wxDialog
{
private:
protected:
enum
{
ID_OPEN_NELIST = 1000,
ID_READ_NETLIST_FILE,
ID_TEST_NETLIST,
ID_COMPILE_RATSNEST,
};
wxRadioBox* m_Select_By_Timestamp;
wxRadioBox* m_ChangeExistingFootprintCtrl;
wxRadioBox* m_DeleteBadTracks;
wxRadioBox* m_RemoveExtraFootprintsCtrl;
wxButton* m_button1;
wxButton* m_button2;
wxButton* m_button3;
wxButton* m_button4;
wxButton* m_button5;
wxStaticLine* m_staticline1;
wxStaticText* m_staticTextNetfilename;
wxTextCtrl* m_NetlistFilenameCtrl;
wxStaticText* m_staticText1;
wxTextCtrl* m_MessageWindow;
// Virtual event handlers, overide them in your derived class
virtual void OnOpenNelistClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnReadNetlistFileClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnTestFootprintsClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCompileRatsnestClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
public:
DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id = wxID_CANCEL, const wxString& title = _("Netlist Dialog"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 519,431 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_NETLIST_FBP();
};
#endif //__dialog_netlist_fbp__
......@@ -40,7 +40,7 @@ DIALOG_PCBNEW_CONFIG_LIBS::DIALOG_PCBNEW_CONFIG_LIBS( WinEDA_PcbFrame* parent ):
SetTitle( title );
if( GetSizer() )
GetSizer()->SetSizeHints( this );
GetSizer()->SetSizeHints( this );
}
......
......@@ -55,6 +55,8 @@ OBJECTS= $(TARGET).o\
set_grid.o \
pcbcfg.o \
netlist.o \
dialog_netlist.o \
dialog_netlist_fbp.o \
affiche.o \
swap_layers.o \
tracepcb.o \
......@@ -152,7 +154,7 @@ pcbnew.o: pcbnew.cpp pcbnew.h pcbplot.h drag.h \
pcbcfg.o: pcbcfg.cpp pcbcfg.h pcbplot.h
netlist.o: netlist.cpp dialog_netlist.cpp dialog_netlist.h
netlist.o: netlist.cpp dialog_netlist.h
gen_modules_placefile.o: gen_modules_placefile.cpp
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment