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