Commit f4eeb4df authored by charras's avatar charras

fixed problem in modedit when creating a new footprint. Minor others changes

parent 43d6c685
......@@ -8,7 +8,7 @@
#include "appl_wxstruct.h"
#define BUILD_VERSION "(20090910-unstable)"
#define BUILD_VERSION "(20090921-unstable)"
#ifdef HAVE_SVN_VERSION
......
......@@ -549,7 +549,7 @@ bool LIB_COMPONENT::Load( FILE* file, char* line, int* lineNum,
if( strcmp( p, "DEF" ) != 0 )
{
errorMsg.Printf( _( "DEF command expected in line %d, aborted." ),
errorMsg.Printf( wxT( "DEF command expected in line %d, aborted." ),
*lineNum );
return false;
}
......@@ -704,14 +704,14 @@ bool LIB_COMPONENT::LoadDrawEntries( FILE* f, char* line,
break;
default:
errorMsg.Printf( _( "undefined DRAW command %c" ), line[0] );
errorMsg.Printf( wxT( "undefined DRAW command %c" ), line[0] );
m_Drawings = headEntry;
return false;
}
if( !newEntry->Load( line, errorMsg ) )
{
errorMsg.Printf( _( "error <%s> in DRAW command %c" ),
errorMsg.Printf( wxT( "error <%s> in DRAW command %c" ),
( const wxChar* ) errorMsg, line[0] );
SAFE_DELETE( newEntry );
......
No preview for this file type
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: kicad\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-09-18 20:34+0100\n"
"PO-Revision-Date: 2009-09-18 20:38+0100\n"
"POT-Creation-Date: 2009-09-21 19:56+0100\n"
"PO-Revision-Date: 2009-09-21 19:59+0100\n"
"Last-Translator: \n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"MIME-Version: 1.0\n"
......@@ -4820,7 +4820,7 @@ msgstr "Cette NetClass existe déjà, et ne peut être ajoutée; Abandon"
#: pcbnew/dialog_design_rules.cpp:640
#, c-format
msgid "%s: <b>Via Drill</b> &ge; <b>Via Dia</b><br>"
msgstr ""
msgstr "%s: <b>Perçage Via</b> &ge; <b>Diam Via</b><br>"
#: pcbnew/dialog_print_using_printer_base.cpp:35
msgid "Exclude Edges_Pcb Layer"
......@@ -5835,31 +5835,28 @@ msgid "Default"
msgstr "Défaut"
#: pcbnew/dialog_design_rules_base.cpp:59
#, fuzzy
msgid "Net Class parameters"
msgstr "Classes d'Equipots."
msgstr "Paramètres de NeClass"
#: pcbnew/dialog_design_rules_base.cpp:68
msgid "Add another Net Class"
msgstr ""
msgstr "Ajouter une autre NetClass"
#: pcbnew/dialog_design_rules_base.cpp:73
#, fuzzy
msgid "Remove the currently select Net Class"
msgstr "Le texte (ou la valeur) du champ actuellement sélectionné"
msgstr "Supprimer la NetClass actuellement sélectionnée"
#: pcbnew/dialog_design_rules_base.cpp:77
msgid "Move Up"
msgstr "Vers le haut ^"
#: pcbnew/dialog_design_rules_base.cpp:78
#, fuzzy
msgid "Move the currently selected Net Class up one row"
msgstr "Déplacer le champ optionnel sélectionné de une position vers le haut"
msgstr "Déplacer la NetClassl sélectionné de une ligne vers le haut"
#: pcbnew/dialog_design_rules_base.cpp:87
msgid "Membership:"
msgstr ""
msgstr "Membres:"
#: pcbnew/dialog_design_rules_base.cpp:107
msgid "<<<"
......@@ -5999,9 +5996,8 @@ msgid "Export current drawing"
msgstr "Exporter le dessin en cours"
#: eeschema/tool_lib.cpp:104
#, fuzzy
msgid "Save current library to disk"
msgstr "Sauver le C.I. actuel"
msgstr "Sauver la librairie courante sur disque"
#: eeschema/tool_lib.cpp:112
msgid "Delete component in current library"
......@@ -6016,9 +6012,8 @@ msgid "Select component to edit"
msgstr "Sélectionner le composant à éditer"
#: eeschema/tool_lib.cpp:125
#, fuzzy
msgid "Update current component in current library"
msgstr "Supprimer composant en librairie de travail"
msgstr "Mettre à jour le composant courant en librairie de travail"
#: eeschema/tool_lib.cpp:128
msgid "Import component"
......@@ -6029,9 +6024,8 @@ msgid "Export component"
msgstr "Exporter composant"
#: eeschema/tool_lib.cpp:135
#, fuzzy
msgid "Save current component to new library"
msgstr "Sauver le composant courant en librairie courante (en mémoire)"
msgstr "Sauver le composant courant dans une nouvelle librairie"
#: eeschema/tool_lib.cpp:138
msgid "Undo last command"
......@@ -6528,9 +6522,8 @@ msgid "none selected"
msgstr "Pas de sélection"
#: eeschema/viewlibs.cpp:317
#, fuzzy
msgid "Part"
msgstr "Composant %c"
msgstr "Part"
#: eeschema/viewlibs.cpp:318
msgid "Alias"
......@@ -6557,9 +6550,9 @@ msgid "Background Color:"
msgstr "Couleur du Fond:"
#: eeschema/edit_component_in_lib.cpp:155
#, fuzzy, c-format
#, c-format
msgid "Alias <%s> not found for component <%s> in library <%s>."
msgstr "Element <%s> non trouvé en librairie <%s>."
msgstr "Alias <%s> non trouvé pour le component <%s> en librairie <%s>."
#: eeschema/edit_component_in_lib.cpp:159
msgid "Component Library Error"
......@@ -6569,11 +6562,11 @@ msgstr "Erreur en Librairie de Composanr"
#: eeschema/edit_component_in_lib.cpp:343
#, c-format
msgid "Alias <%s> cannot be removed while it is being edited!"
msgstr ""
msgstr "L'alias <%s> ne peut être supprimé tant qu'il est en cours d'édition!"
#: eeschema/edit_component_in_lib.cpp:285
msgid "Remove all aliases from list?"
msgstr ""
msgstr "Supprimer tous les alias de la liste?"
#: eeschema/edit_component_in_lib.cpp:308
msgid "New alias:"
......@@ -6584,9 +6577,9 @@ msgid "Component Alias"
msgstr "Alias de Composant"
#: eeschema/edit_component_in_lib.cpp:318
#, fuzzy, c-format
#, c-format
msgid "Alias or component name <%s> already exists in library <%s>."
msgstr "Composant %s sauvé en librairie %s"
msgstr "Alias ou nom de composant <%s> déjà existant en librairie <%s>."
#: eeschema/edit_component_in_lib.cpp:396
msgid "Delete units"
......@@ -6955,9 +6948,9 @@ msgid "Please select a component library."
msgstr "SVP sélectionner une librairie de composants."
#: eeschema/libedit.cpp:389
#, fuzzy, c-format
#, c-format
msgid "Component library <%s> is empty."
msgstr "Fichier document de composants <%s> vide"
msgstr "Fichier librairie de composants <%s> vide"
#: eeschema/libedit.cpp:391
#, fuzzy
......@@ -8297,11 +8290,6 @@ msgstr ""
msgid "User defined search path"
msgstr "Chemin de recherche défini par l'utilisateur"
#: eeschema/class_libentry.cpp:552
#, c-format
msgid "DEF command expected in line %d, aborted."
msgstr ""
#: eeschema/class_libentry.cpp:574
#, c-format
msgid "Wrong DEF format in line %d, skipped."
......@@ -8311,16 +8299,6 @@ msgstr ""
msgid "file ended prematurely loading component draw element"
msgstr ""
#: eeschema/class_libentry.cpp:707
#, c-format
msgid "undefined DRAW command %c"
msgstr ""
#: eeschema/class_libentry.cpp:714
#, c-format
msgid "error <%s> in DRAW command %c"
msgstr ""
#: eeschema/class_libentry.cpp:723
msgid "file ended prematurely while attempting to flush to end of drawing section."
msgstr ""
......@@ -8639,9 +8617,9 @@ msgid "Import Component"
msgstr "Importer Composant"
#: eeschema/lib_export.cpp:65
#, fuzzy, c-format
#, c-format
msgid "Component library file <%s> is empty."
msgstr "Fichier document de composants <%s> vide"
msgstr "Le fichier de composants <%s> est vide."
#: eeschema/lib_export.cpp:100
msgid "There is no component selected to save."
......@@ -9031,9 +9009,9 @@ msgid "Component library <%s> has duplicate entry name <%s>. This may cause som
msgstr ""
#: eeschema/class_library.cpp:184
#, fuzzy, c-format
#, c-format
msgid "Cannot add duplicate alias <%s> to library <%s>."
msgstr "Ne peut créer une copie de l'élément <%s> en librairie <%s>."
msgstr "Ne peut ajouter un double de l'alias <%s> en librairie <%s>."
#: eeschema/class_library.cpp:223
#, c-format
......@@ -9041,14 +9019,12 @@ msgid "Conflict in library <%s>: alias <%s> already has root name <%s> and will
msgstr ""
#: eeschema/class_library.cpp:453
#, fuzzy
msgid "The component library file name is not set."
msgstr "Nom du fichier librairie non sélectionné"
msgstr "Le nom du fichier librairie est non sélectionné."
#: eeschema/class_library.cpp:461
#, fuzzy
msgid "The file could not be opened."
msgstr "Fichier d'aide %s non trouvé."
msgstr "Le fichier n'a pas pu être ouvert."
#: eeschema/class_library.cpp:467
msgid "The file is empty!"
......@@ -9077,9 +9053,8 @@ msgid ""
msgstr ""
#: eeschema/class_library.cpp:539
#, fuzzy
msgid "An error occured attempting to read the header."
msgstr "L'erreur <%s> s'est produite lors du chargement de la librairie de composants <%s>"
msgstr "Une 'erreur s'est produite lors de la lecture de l'entête."
#: eeschema/class_library.cpp:569
#, c-format
......@@ -9969,7 +9944,7 @@ msgstr "Ne peut ouvrir le fichier librairie de modules PCB <%s>."
msgid "<%s> is not a valid Kicad PCB foot print library."
msgstr "<%s> in'est pas un fichier de module PCB Kicad valide."
#: cvpcb/loadcmp.cpp:137
#: cvpcb/loadcmp.cpp:136
#, c-format
msgid "Module %s not found"
msgstr "Module %s non trouvé"
......@@ -10052,24 +10027,24 @@ msgstr "Cvpcb est en cours d'exécution. Continuer ?"
msgid " [no file]"
msgstr " [pas de fichier]"
#: cvpcb/displayframe.cpp:124
#: cvpcb/displayframe.cpp:130
msgid "Display Options"
msgstr "Options d'Affichage"
#: cvpcb/displayframe.cpp:130
#: cvpcb/displayframe.cpp:136
msgid "zoom + (F1)"
msgstr "zoom + (F1)"
#: cvpcb/displayframe.cpp:134
#: cvpcb/displayframe.cpp:140
msgid "zoom - (F2)"
msgstr "zoom - (F2)"
#: cvpcb/displayframe.cpp:138
#: cvpcb/displayframe.cpp:144
msgid "redraw (F3)"
msgstr "Redessin (F3)"
#: cvpcb/displayframe.cpp:142
#: cvpcb/displayframe.cpp:147
#: cvpcb/displayframe.cpp:148
#: cvpcb/displayframe.cpp:153
msgid "1:1 zoom"
msgstr "1:1 zoom"
......@@ -11814,9 +11789,8 @@ msgid "Module properties"
msgstr "Propriétés du Module"
#: pcbnew/dialog_copper_layers_setup_base.h:55
#, fuzzy
msgid "Copper layers setup"
msgstr "Couches Cuivre"
msgstr "Réglage des Couches Cuivre"
#: eeschema/dialog_cmp_graphic_properties.h:43
msgid "Graphic shape properties"
......
......@@ -30,8 +30,9 @@ BOARD::BOARD( EDA_BaseStruct* parent, WinEDA_BasePcbFrame* frame ) :
m_CurrentZoneContour = NULL; // This ZONE_CONTAINER handle the zone contour cuurently in progress
m_NetInfo = new NETINFO_LIST( this ); // handle nets info list (name, design constraints ..
m_NetInfo->BuildListOfNets(); // prepare pads and nets lists containers.
for( int layer = 0; layer<NB_COPPER_LAYERS; ++layer )
for( int layer = 0; layer < NB_COPPER_LAYERS; ++layer )
{
m_Layer[layer].m_Name = ReturnPcbLayerName( layer, true );
m_Layer[layer].m_Type = LT_SIGNAL;
......
......@@ -91,13 +91,21 @@ int BOARD_CONNECTED_ITEM::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const
return max( hisClearance, myClearance );
}
else
{
#ifdef __WXDEBUG__
wxLogWarning(wxT("BOARD_CONNECTED_ITEM::GetClearance(): NULL hisclass") );
#endif
}
}
return myclass->GetClearance();
}
else
{
#ifdef __WXDEBUG__
wxLogWarning(wxT("BOARD_CONNECTED_ITEM::GetClearance(): NULL netclass") );
#endif
}
return 0;
}
......@@ -116,15 +124,25 @@ NETCLASS* BOARD_CONNECTED_ITEM::GetNetClass() const
if( net )
{
NETCLASS* netclass = net->GetNetClass();
#ifdef __WXDEBUG__
if( netclass == NULL )
wxLogWarning(wxT("BOARD_CONNECTED_ITEM::GetNetClass(): NULL netclass") );
#endif
return netclass;
}
else
{
#ifdef __WXDEBUG__
wxLogWarning(wxT("BOARD_CONNECTED_ITEM::GetNetClass(): NULL net") );
#endif
}
}
else
{
#ifdef __WXDEBUG__
wxLogWarning(wxT("BOARD_CONNECTED_ITEM::GetNetClass(): NULL board, type %d"), Type() );
#endif
}
return NULL;
}
......@@ -19,21 +19,23 @@
D_PAD::D_PAD( MODULE* parent ) : BOARD_CONNECTED_ITEM( parent, TYPE_PAD )
{
m_NumPadName = 0;
m_Masque_Layer = CUIVRE_LAYER;
m_DrillShape = PAD_CIRCLE; // Drill shape = circle
m_Size.x = m_Size.y = 500;
m_Size.x = m_Size.y = 500; // give it a reasonnable size
m_Orient = 0; // Pad rotation in 1/10 degrees
if( m_Parent && (m_Parent->Type() == TYPE_MODULE) )
{
m_Pos = ( (MODULE*) m_Parent )->GetPosition();
}
m_PadShape = PAD_CIRCLE; // forme CERCLE, PAD_RECT PAD_OVAL PAD_TRAPEZOID ou libre
m_Attribut = PAD_STANDARD; // NORMAL, PAD_SMD, PAD_CONN, Bit 7 = STACK
m_Orient = 0; // en 1/10 degres
m_PadShape = PAD_CIRCLE; // Shape: PAD_CIRCLE, PAD_RECT PAD_OVAL PAD_TRAPEZOID
m_Attribut = PAD_STANDARD; // Type: NORMAL, PAD_SMD, PAD_CONN
m_DrillShape = PAD_CIRCLE; // Drill shape = circle
// these layers are ok for a standard pad:
m_Masque_Layer = ALL_CU_LAYERS | SILKSCREEN_LAYER_CMP |\
SOLDERMASK_LAYER_CU | SOLDERMASK_LAYER_CMP;
SetSubRatsnest( 0 );
SetSubRatsnest( 0 ); // used in ratsnest calculations
ComputeRayon();
}
......
......@@ -93,6 +93,30 @@ DIALOG_DESIGN_RULES::DIALOG_DESIGN_RULES( WinEDA_PcbFrame* parent ) :
}
/* Display on m_MessagesList the current global settings:
* minimal values for tracks, vias, clearance ...
*/
void DIALOG_DESIGN_RULES::PrintCurrentSettings( )
{
wxString msg, value;
int internal_units = m_Parent->m_InternalUnits;
m_MessagesList->AppendToPage(_("<b>Current general setting:</b><br>") );
// Display min values:
value = ReturnStringFromValue( g_UnitMetric, g_DesignSettings.m_TrackMinWidth, internal_units, true );
msg.Printf(_("Minimum value for tracks width: <b>%s</b><br>\n"), value.GetData() );
m_MessagesList->AppendToPage(msg);
value = ReturnStringFromValue( g_UnitMetric, g_DesignSettings.m_ViasMinSize, internal_units, true );
msg.Printf(_("Minimum value for vias diameter: <b>%s</b><br>\n"), value.GetData() );
m_MessagesList->AppendToPage(msg);
value = ReturnStringFromValue( g_UnitMetric, g_DesignSettings.m_MicroViasMinSize, internal_units, true );
msg.Printf(_("Minimum value for microvias diameter: <b>%s</b><br>\n"), value.GetData() );
m_MessagesList->AppendToPage(msg);
}
/********************************************************************/
void DIALOG_DESIGN_RULES::Init()
/********************************************************************/
......@@ -117,11 +141,13 @@ void DIALOG_DESIGN_RULES::Init()
netclass = netclasses.GetDefault();
// Initialize list of nets for Default Net Class
for( NETCLASS::const_iterator name = netclass->begin(); name != netclass->end(); ++name )
{
m_AllNets.push_back( NETCUP( *name, netclass->GetName() ) );
}
// Initialize list of nets for others (custom) Net Classes
for( NETCLASSES::const_iterator nc = netclasses.begin(); nc != netclasses.end(); ++nc )
{
netclass = nc->second;
......@@ -133,6 +159,8 @@ void DIALOG_DESIGN_RULES::Init()
}
InitializeRulesSelectionBoxes();
PrintCurrentSettings( );
}
// Sort comparison function
......
......@@ -65,6 +65,7 @@ private:
void CopyRulesListToBoard();
void SetRoutableLayerStatus();
void FillListBoxWithNetNames( wxListCtrl* aListCtrl, const wxString& aNetClass );
void PrintCurrentSettings( );
/**
* Function swapNetClass
......
......@@ -705,7 +705,7 @@ int WinEDA_BasePcbFrame::Save_Module_In_Library( const wxString& aLibName,
MODULE* WinEDA_BasePcbFrame::Create_1_Module( wxDC* DC, const wxString& module_name )
/************************************************************************************/
/* Create a new module or footprint : A new module is tartted with 2 texts :
/* Create a new module or footprint : A new module contains 2 texts :
* First = REFERENCE
* Second = VALUE: "VAL**"
* the new module is added on begining of the linked list of modules
......
......@@ -165,7 +165,7 @@ MODULE* WinEDA_BasePcbFrame::Load_Module_From_Library( const wxString& library,
module->SetPosition( curspos );
/* TODO: call RecalculateAllTracksNetcode() only if some pads pads have
* a netname.
* If all pads are "not connected (usually the caes in module libraries,
* If all pads are not connected (usually the case in module libraries,
* rebuild only the pad and list of nets ( faster)
*/
// GetBoard()->m_Pcb->m_NetInfo->BuildListOfNets();
......
......@@ -223,6 +223,10 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
MODULE* module = Create_1_Module( NULL, wxEmptyString );
if( module ) // i.e. if create module command not aborted
{
// Initialize data relative to nets and netclasses (for a new module
// the defaults are used)
// This is mandatory to handle and draw pads
GetBoard()->m_NetInfo->BuildListOfNets();
redraw = true;
module->SetPosition( wxPoint( 0, 0 ) );
if( GetBoard()->m_Modules )
......
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