Commit f0cd1476 authored by CHARRAS's avatar CHARRAS

pcbnew: use collector class to locate items in modedit, the footprint editor (thanks, Dick).

parent 5fc79254
...@@ -15,6 +15,10 @@ email address. ...@@ -15,6 +15,10 @@ email address.
display frame display frame
minor other changes minor other changes
+ pcbnew:
Use collector class to locate items in modedit.
This is a big enhancement,
but a small work for me because Dick made all the work.
2007-Oct-26 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2007-Oct-26 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
......
...@@ -942,7 +942,7 @@ public: ...@@ -942,7 +942,7 @@ public:
virtual void HandleBlockPlace( wxDC* DC ); virtual void HandleBlockPlace( wxDC* DC );
virtual int HandleBlockEnd( wxDC* DC ); virtual int HandleBlockEnd( wxDC* DC );
BOARD_ITEM* ModeditLocateAndDisplay(); BOARD_ITEM* ModeditLocateAndDisplay( int aHotKeyCode = 0 );
/* Undo and redo functions */ /* Undo and redo functions */
public: public:
......
No preview for this file type
...@@ -2,7 +2,7 @@ msgid "" ...@@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: kicad\n" "Project-Id-Version: kicad\n"
"POT-Creation-Date: \n" "POT-Creation-Date: \n"
"PO-Revision-Date: 2007-10-24 22:13+0100\n" "PO-Revision-Date: 2007-10-27 18:37+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"
...@@ -122,7 +122,7 @@ msgstr "Addition ...@@ -122,7 +122,7 @@ msgstr "Addition
#: pcbnew/edit.cpp:283 #: pcbnew/edit.cpp:283
#: pcbnew/tool_modedit.cpp:180 #: pcbnew/tool_modedit.cpp:180
#: eeschema/schedit.cpp:314 #: eeschema/schedit.cpp:314
#: eeschema/libframe.cpp:502 #: eeschema/libframe.cpp:503
#: gerbview/tool_gerber.cpp:383 #: gerbview/tool_gerber.cpp:383
msgid "Add Text" msgid "Add Text"
msgstr "Ajout de Texte" msgstr "Ajout de Texte"
...@@ -146,7 +146,7 @@ msgstr "Monter le chevelu g ...@@ -146,7 +146,7 @@ msgstr "Monter le chevelu g
#: pcbnew/edit.cpp:461 #: pcbnew/edit.cpp:461
#: pcbnew/modedit.cpp:344 #: pcbnew/modedit.cpp:344
#: eeschema/schedit.cpp:454 #: eeschema/schedit.cpp:454
#: eeschema/libframe.cpp:578 #: eeschema/libframe.cpp:579
msgid "Delete item" msgid "Delete item"
msgstr "Suppression d'lments" msgstr "Suppression d'lments"
...@@ -411,7 +411,7 @@ msgid "Create error " ...@@ -411,7 +411,7 @@ msgid "Create error "
msgstr "Erreur en cration " msgstr "Erreur en cration "
#: pcbnew/muwave_command.cpp:52 #: pcbnew/muwave_command.cpp:52
#: eeschema/libframe.cpp:518 #: eeschema/libframe.cpp:519
msgid "Add Line" msgid "Add Line"
msgstr "Addition de lignes" msgstr "Addition de lignes"
...@@ -1131,8 +1131,8 @@ msgstr "Offset Y" ...@@ -1131,8 +1131,8 @@ msgstr "Offset Y"
#: eeschema/dialog_cmp_graphic_properties.cpp:178 #: eeschema/dialog_cmp_graphic_properties.cpp:178
#: eeschema/pinedit-dialog.cpp:308 #: eeschema/pinedit-dialog.cpp:308
#: eeschema/dialog_build_BOM.cpp:339 #: eeschema/dialog_build_BOM.cpp:339
#: cvpcb/dialog_display_options.cpp:190 #: cvpcb/dialog_cvpcb_config.cpp:139
#: cvpcb/dialog_cvpcb_config.cpp:135 #: cvpcb/dialog_display_options.cpp:186
#: share/setpage.cpp:232 #: share/setpage.cpp:232
msgid "&OK" msgid "&OK"
msgstr "&OK" msgstr "&OK"
...@@ -1155,7 +1155,7 @@ msgstr "&OK" ...@@ -1155,7 +1155,7 @@ msgstr "&OK"
#: eeschema/dialog_cmp_graphic_properties.cpp:182 #: eeschema/dialog_cmp_graphic_properties.cpp:182
#: eeschema/pinedit-dialog.cpp:304 #: eeschema/pinedit-dialog.cpp:304
#: eeschema/dialog_build_BOM.cpp:343 #: eeschema/dialog_build_BOM.cpp:343
#: cvpcb/dialog_display_options.cpp:195 #: cvpcb/dialog_display_options.cpp:191
#: share/setpage.cpp:237 #: share/setpage.cpp:237
msgid "&Cancel" msgid "&Cancel"
msgstr "&Annuler" msgstr "&Annuler"
...@@ -1278,7 +1278,7 @@ msgstr "Composant [%s]: Module <%sw non trouv ...@@ -1278,7 +1278,7 @@ msgstr "Composant [%s]: Module <%sw non trouv
#: pcbnew/dialog_setup_libs.cpp:97 #: pcbnew/dialog_setup_libs.cpp:97
#: eeschema/eestatus.cpp:111 #: eeschema/eestatus.cpp:111
#: eeschema/dialog_eeschema_config.cpp:105 #: eeschema/dialog_eeschema_config.cpp:105
#: cvpcb/dialog_cvpcb_config.cpp:74 #: cvpcb/dialog_cvpcb_config.cpp:76
#: gerbview/reglage.cpp:98 #: gerbview/reglage.cpp:98
msgid "from " msgid "from "
msgstr "De " msgstr "De "
...@@ -1287,8 +1287,8 @@ msgstr "De " ...@@ -1287,8 +1287,8 @@ msgstr "De "
#: pcbnew/dialog_setup_libs.cpp:153 #: pcbnew/dialog_setup_libs.cpp:153
#: eeschema/eestatus.cpp:116 #: eeschema/eestatus.cpp:116
#: eeschema/dialog_eeschema_config.cpp:161 #: eeschema/dialog_eeschema_config.cpp:161
#: cvpcb/dialog_display_options.cpp:181 #: cvpcb/dialog_cvpcb_config.cpp:131
#: cvpcb/dialog_cvpcb_config.cpp:127 #: cvpcb/dialog_display_options.cpp:177
msgid "Save Cfg" msgid "Save Cfg"
msgstr "Sauver config" msgstr "Sauver config"
...@@ -1296,6 +1296,8 @@ msgstr "Sauver config" ...@@ -1296,6 +1296,8 @@ msgstr "Sauver config"
#: pcbnew/dialog_setup_libs.cpp:175 #: pcbnew/dialog_setup_libs.cpp:175
#: eeschema/eestatus.cpp:120 #: eeschema/eestatus.cpp:120
#: eeschema/dialog_eeschema_config.cpp:196 #: eeschema/dialog_eeschema_config.cpp:196
#: cvpcb/dialog_cvpcb_config.cpp:170
#: cvpcb/dialog_cvpcb_config.cpp:202
msgid "Del" msgid "Del"
msgstr "Supprimer" msgstr "Supprimer"
...@@ -1305,6 +1307,8 @@ msgstr "Supprimer" ...@@ -1305,6 +1307,8 @@ msgstr "Supprimer"
#: eeschema/dialog_eeschema_config.cpp:200 #: eeschema/dialog_eeschema_config.cpp:200
#: eeschema/edit_component_in_lib.cpp:233 #: eeschema/edit_component_in_lib.cpp:233
#: eeschema/edit_component_in_lib.cpp:312 #: eeschema/edit_component_in_lib.cpp:312
#: cvpcb/dialog_cvpcb_config.cpp:174
#: cvpcb/dialog_cvpcb_config.cpp:206
msgid "Add" msgid "Add"
msgstr "Ajouter" msgstr "Ajouter"
...@@ -1312,6 +1316,8 @@ msgstr "Ajouter" ...@@ -1312,6 +1316,8 @@ msgstr "Ajouter"
#: pcbnew/dialog_setup_libs.cpp:183 #: pcbnew/dialog_setup_libs.cpp:183
#: eeschema/eestatus.cpp:128 #: eeschema/eestatus.cpp:128
#: eeschema/dialog_eeschema_config.cpp:204 #: eeschema/dialog_eeschema_config.cpp:204
#: cvpcb/dialog_cvpcb_config.cpp:178
#: cvpcb/dialog_cvpcb_config.cpp:210
msgid "Ins" msgid "Ins"
msgstr "Insrer" msgstr "Insrer"
...@@ -1323,7 +1329,7 @@ msgstr "Lib Modules:" ...@@ -1323,7 +1329,7 @@ msgstr "Lib Modules:"
#: pcbnew/dialog_setup_libs.cpp:159 #: pcbnew/dialog_setup_libs.cpp:159
#: eeschema/eestatus.cpp:148 #: eeschema/eestatus.cpp:148
#: eeschema/dialog_eeschema_config.cpp:180 #: eeschema/dialog_eeschema_config.cpp:180
#: cvpcb/dialog_cvpcb_config.cpp:147 #: cvpcb/dialog_cvpcb_config.cpp:151
msgid "Files ext:" msgid "Files ext:"
msgstr "Ext. Fichiers" msgstr "Ext. Fichiers"
...@@ -1443,8 +1449,6 @@ msgstr "Garder" ...@@ -1443,8 +1449,6 @@ msgstr "Garder"
#: pcbnew/onrightclick.cpp:816 #: pcbnew/onrightclick.cpp:816
#: eeschema/edit_component_in_lib.cpp:239 #: eeschema/edit_component_in_lib.cpp:239
#: eeschema/edit_component_in_lib.cpp:320 #: eeschema/edit_component_in_lib.cpp:320
#: cvpcb/dialog_cvpcb_config.cpp:166
#: cvpcb/dialog_cvpcb_config.cpp:198
msgid "Delete" msgid "Delete"
msgstr "Supprimer" msgstr "Supprimer"
...@@ -1480,109 +1484,109 @@ msgstr "Test Modules" ...@@ -1480,109 +1484,109 @@ msgstr "Test Modules"
msgid "Compile" msgid "Compile"
msgstr "Compile" msgstr "Compile"
#: pcbnew/pcbframe.cpp:261 #: pcbnew/pcbframe.cpp:262
msgid "Board modified, Save before exit ?" msgid "Board modified, Save before exit ?"
msgstr "Circuit Imprim modifie, Sauver avant de quitter ?" msgstr "Circuit Imprim modifie, Sauver avant de quitter ?"
#: pcbnew/pcbframe.cpp:262 #: pcbnew/pcbframe.cpp:263
#: eeschema/schframe.cpp:183 #: eeschema/schframe.cpp:183
#: cvpcb/cvframe.cpp:169 #: cvpcb/cvframe.cpp:169
#: common/confirm.cpp:109 #: common/confirm.cpp:109
msgid "Confirmation" msgid "Confirmation"
msgstr "Confirmation" msgstr "Confirmation"
#: pcbnew/pcbframe.cpp:362 #: pcbnew/pcbframe.cpp:363
msgid "DRC Off (Disable !!!), Currently: DRC is active" msgid "DRC Off (Disable !!!), Currently: DRC is active"
msgstr "DRC off (dsactive !!!), actuellement DRC active" msgstr "DRC off (dsactive !!!), actuellement DRC active"
#: pcbnew/pcbframe.cpp:363 #: pcbnew/pcbframe.cpp:364
msgid "DRC On (Currently: DRC is inactive !!!)" msgid "DRC On (Currently: DRC is inactive !!!)"
msgstr "DRC On (Actuellement, DRC dsactive !!!)" msgstr "DRC On (Actuellement, DRC dsactive !!!)"
#: pcbnew/pcbframe.cpp:374 #: pcbnew/pcbframe.cpp:375
msgid "Polar Coords not show" msgid "Polar Coords not show"
msgstr "Coord Polaires non affiches" msgstr "Coord Polaires non affiches"
#: pcbnew/pcbframe.cpp:375 #: pcbnew/pcbframe.cpp:376
msgid "Display Polar Coords" msgid "Display Polar Coords"
msgstr "Affichage coord Polaires" msgstr "Affichage coord Polaires"
#: pcbnew/pcbframe.cpp:380 #: pcbnew/pcbframe.cpp:381
#: eeschema/schframe.cpp:261 #: eeschema/schframe.cpp:261
msgid "Grid not show" msgid "Grid not show"
msgstr "Grille non montre" msgstr "Grille non montre"
#: pcbnew/pcbframe.cpp:380 #: pcbnew/pcbframe.cpp:381
#: eeschema/schframe.cpp:261 #: eeschema/schframe.cpp:261
msgid "Show Grid" msgid "Show Grid"
msgstr "Afficher grille" msgstr "Afficher grille"
#: pcbnew/pcbframe.cpp:389 #: pcbnew/pcbframe.cpp:390
msgid "General ratsnest not show" msgid "General ratsnest not show"
msgstr "Chevelu gnral non affich" msgstr "Chevelu gnral non affich"
#: pcbnew/pcbframe.cpp:389 #: pcbnew/pcbframe.cpp:390
msgid "Show General ratsnest" msgid "Show General ratsnest"
msgstr "Afficher le chevelu gnral" msgstr "Afficher le chevelu gnral"
#: pcbnew/pcbframe.cpp:395 #: pcbnew/pcbframe.cpp:396
msgid "Module ratsnest not show" msgid "Module ratsnest not show"
msgstr "Ne pas montrer le chevelu du module pendant dplacement" msgstr "Ne pas montrer le chevelu du module pendant dplacement"
#: pcbnew/pcbframe.cpp:396 #: pcbnew/pcbframe.cpp:397
msgid "Show Module ratsnest" msgid "Show Module ratsnest"
msgstr "Montrer le chevelu du module" msgstr "Montrer le chevelu du module"
#: pcbnew/pcbframe.cpp:403 #: pcbnew/pcbframe.cpp:404
msgid "Disable Auto Delete old Track" msgid "Disable Auto Delete old Track"
msgstr "Ne pas Autoriser l'effacement automatique des pistes" msgstr "Ne pas Autoriser l'effacement automatique des pistes"
#: pcbnew/pcbframe.cpp:404 #: pcbnew/pcbframe.cpp:405
msgid "Enable Auto Delete old Track" msgid "Enable Auto Delete old Track"
msgstr "Autoriser l'effacement automatique des pistes" msgstr "Autoriser l'effacement automatique des pistes"
#: pcbnew/pcbframe.cpp:411 #: pcbnew/pcbframe.cpp:412
msgid "Do not Show Zones" msgid "Do not Show Zones"
msgstr "Ne pas monter Zones" msgstr "Ne pas monter Zones"
#: pcbnew/pcbframe.cpp:411 #: pcbnew/pcbframe.cpp:412
#: pcbnew/tool_pcb.cpp:361 #: pcbnew/tool_pcb.cpp:361
#: pcbnew/set_color.h:344 #: pcbnew/set_color.h:344
msgid "Show Zones" msgid "Show Zones"
msgstr "Monter Zones" msgstr "Monter Zones"
#: pcbnew/pcbframe.cpp:417 #: pcbnew/pcbframe.cpp:418
msgid "Show Pads Sketch mode" msgid "Show Pads Sketch mode"
msgstr "Afficher pastilles en contour" msgstr "Afficher pastilles en contour"
#: pcbnew/pcbframe.cpp:418 #: pcbnew/pcbframe.cpp:419
msgid "Show pads filled mode" msgid "Show pads filled mode"
msgstr "Afficher pastilles en mode plein" msgstr "Afficher pastilles en mode plein"
#: pcbnew/pcbframe.cpp:424 #: pcbnew/pcbframe.cpp:425
msgid "Show Tracks Sketch mode" msgid "Show Tracks Sketch mode"
msgstr "Afficher pistes en contour" msgstr "Afficher pistes en contour"
#: pcbnew/pcbframe.cpp:425 #: pcbnew/pcbframe.cpp:426
msgid "Show Tracks filled mode" msgid "Show Tracks filled mode"
msgstr "Afficher pistes en mode plein" msgstr "Afficher pistes en mode plein"
#: pcbnew/pcbframe.cpp:431 #: pcbnew/pcbframe.cpp:432
msgid "Normal Contrast Mode Display" msgid "Normal Contrast Mode Display"
msgstr "Mode d'affichage Contraste normal" msgstr "Mode d'affichage Contraste normal"
#: pcbnew/pcbframe.cpp:432 #: pcbnew/pcbframe.cpp:433
#: pcbnew/tool_pcb.cpp:374 #: pcbnew/tool_pcb.cpp:374
msgid "Hight Contrast Mode Display" msgid "Hight Contrast Mode Display"
msgstr "Mode d'affichage Haut Contraste" msgstr "Mode d'affichage Haut Contraste"
#: pcbnew/pcbframe.cpp:442 #: pcbnew/pcbframe.cpp:443
#: pcbnew/class_board_item.cpp:140 #: pcbnew/class_board_item.cpp:140
#: pcbnew/class_track.cpp:728 #: pcbnew/class_track.cpp:728
msgid "Track" msgid "Track"
msgstr "Piste" msgstr "Piste"
#: pcbnew/pcbframe.cpp:474 #: pcbnew/pcbframe.cpp:475
#: pcbnew/class_board_item.cpp:170 #: pcbnew/class_board_item.cpp:170
msgid "Via" msgid "Via"
msgstr "Via" msgstr "Via"
...@@ -2067,7 +2071,7 @@ msgid "Buried" ...@@ -2067,7 +2071,7 @@ msgid "Buried"
msgstr "Borgne" msgstr "Borgne"
#: pcbnew/class_board_item.cpp:198 #: pcbnew/class_board_item.cpp:198
#: pcbnew/classpcb.cpp:313 #: pcbnew/class_marker.cpp:92
msgid "Marker" msgid "Marker"
msgstr "Marqueur" msgstr "Marqueur"
...@@ -2466,7 +2470,7 @@ msgid "Inches" ...@@ -2466,7 +2470,7 @@ msgid "Inches"
msgstr "Pouces" msgstr "Pouces"
#: pcbnew/set_grid.cpp:148 #: pcbnew/set_grid.cpp:148
#: share/drawframe.cpp:381 #: share/drawframe.cpp:389
msgid "mm" msgid "mm"
msgstr "mm" msgstr "mm"
...@@ -2541,7 +2545,7 @@ msgid "Drill Shape:" ...@@ -2541,7 +2545,7 @@ msgid "Drill Shape:"
msgstr "Forme du perage:" msgstr "Forme du perage:"
#: pcbnew/dialog_pad_edit.cpp:186 #: pcbnew/dialog_pad_edit.cpp:186
#: pcbnew/clean.cpp:456 #: pcbnew/clean.cpp:462
#: eeschema/dialog_erc.cpp:192 #: eeschema/dialog_erc.cpp:192
#: eeschema/dialog_erc.cpp:196 #: eeschema/dialog_erc.cpp:196
#: eeschema/dialog_edit_component_in_schematic.cpp:172 #: eeschema/dialog_edit_component_in_schematic.cpp:172
...@@ -2736,9 +2740,9 @@ msgid "Modules (%d items)" ...@@ -2736,9 +2740,9 @@ msgid "Modules (%d items)"
msgstr "Modules (%d lments)" msgstr "Modules (%d lments)"
#: pcbnew/classpcb.cpp:181 #: pcbnew/classpcb.cpp:181
#: pcbnew/classpcb.cpp:313
#: pcbnew/class_text_mod.cpp:337 #: pcbnew/class_text_mod.cpp:337
#: pcbnew/class_track.cpp:739 #: pcbnew/class_track.cpp:739
#: pcbnew/class_marker.cpp:92
#: gerbview/affiche.cpp:93 #: gerbview/affiche.cpp:93
msgid "Type" msgid "Type"
msgstr "Type" msgstr "Type"
...@@ -2756,10 +2760,6 @@ msgstr " Arc " ...@@ -2756,10 +2760,6 @@ msgstr " Arc "
msgid "Segment" msgid "Segment"
msgstr "Segment" msgstr "Segment"
#: pcbnew/classpcb.cpp:316
msgid "Marker Error Text"
msgstr "Texte du Marqueur d'erreurs"
#: pcbnew/cleaningoptions_dialog.cpp:146 #: pcbnew/cleaningoptions_dialog.cpp:146
msgid "Static" msgid "Static"
msgstr "Static" msgstr "Static"
...@@ -3024,59 +3024,59 @@ msgstr "Ref." ...@@ -3024,59 +3024,59 @@ msgstr "Ref."
#: pcbnew/class_pad.cpp:883 #: pcbnew/class_pad.cpp:883
#: pcbnew/class_edge_mod.cpp:285 #: pcbnew/class_edge_mod.cpp:285
#: pcbnew/class_module.cpp:1142 #: pcbnew/class_module.cpp:1142
#: cvpcb/setvisu.cpp:30 #: cvpcb/setvisu.cpp:31
msgid "Module" msgid "Module"
msgstr "Module" msgstr "Module"
#: pcbnew/clean.cpp:172 #: pcbnew/clean.cpp:177
msgid "Delete unconnected tracks:" msgid "Delete unconnected tracks:"
msgstr "Suppression Pistes non connectes" msgstr "Suppression Pistes non connectes"
#: pcbnew/clean.cpp:191 #: pcbnew/clean.cpp:196
msgid "ViaDef" msgid "ViaDef"
msgstr "ViaDef" msgstr "ViaDef"
#: pcbnew/clean.cpp:362 #: pcbnew/clean.cpp:368
msgid "Clean Null Segments" msgid "Clean Null Segments"
msgstr "Nettoyage segments nulls" msgstr "Nettoyage segments nulls"
#: pcbnew/clean.cpp:454 #: pcbnew/clean.cpp:460
msgid "Merging Segments:" msgid "Merging Segments:"
msgstr "Associe Segment" msgstr "Associe Segment"
#: pcbnew/clean.cpp:456 #: pcbnew/clean.cpp:462
msgid "Merge" msgid "Merge"
msgstr "Merge" msgstr "Merge"
#: pcbnew/clean.cpp:473 #: pcbnew/clean.cpp:478
msgid "Merge: " msgid "Merge: "
msgstr "Merge: " msgstr "Merge: "
#: pcbnew/clean.cpp:698 #: pcbnew/clean.cpp:708
msgid "DRC Control:" msgid "DRC Control:"
msgstr "Controle DRC:" msgstr "Controle DRC:"
#: pcbnew/clean.cpp:703 #: pcbnew/clean.cpp:713
msgid "NetCtr" msgid "NetCtr"
msgstr "NetCtr" msgstr "NetCtr"
#: pcbnew/clean.cpp:1052 #: pcbnew/clean.cpp:1055
msgid "Centre" msgid "Centre"
msgstr "Centre" msgstr "Centre"
#: pcbnew/clean.cpp:1052 #: pcbnew/clean.cpp:1055
msgid "0 " msgid "0 "
msgstr "0" msgstr "0"
#: pcbnew/clean.cpp:1063 #: pcbnew/clean.cpp:1066
msgid "Pads: " msgid "Pads: "
msgstr "Pastilles: " msgstr "Pastilles: "
#: pcbnew/clean.cpp:1067 #: pcbnew/clean.cpp:1070
msgid "Max" msgid "Max"
msgstr "Max" msgstr "Max"
#: pcbnew/clean.cpp:1070 #: pcbnew/clean.cpp:1073
msgid "Segm" msgid "Segm"
msgstr "Segm" msgstr "Segm"
...@@ -3247,11 +3247,12 @@ msgstr "X Pos" ...@@ -3247,11 +3247,12 @@ msgstr "X Pos"
msgid "Y pos" msgid "Y pos"
msgstr "Y pos" msgstr "Y pos"
#: pcbnew/basepcbframe.cpp:119 #: pcbnew/basepcbframe.cpp:129
msgid "3D Frame already opened" msgid "3D Frame already opened"
msgstr "Fenetre 3D dj ouverte" msgstr "Fenetre 3D dj ouverte"
#: pcbnew/basepcbframe.cpp:122 #: pcbnew/basepcbframe.cpp:134
#: pcbnew/basepcbframe.cpp:137
msgid "3D Viewer" msgid "3D Viewer"
msgstr "Visu 3D" msgstr "Visu 3D"
...@@ -3481,7 +3482,7 @@ msgstr "Appliquer" ...@@ -3481,7 +3482,7 @@ msgstr "Appliquer"
#: eeschema/eestatus.cpp:139 #: eeschema/eestatus.cpp:139
#: eeschema/dialog_eeschema_config.cpp:211 #: eeschema/dialog_eeschema_config.cpp:211
#: cvpcb/menucfg.cpp:231 #: cvpcb/menucfg.cpp:231
#: cvpcb/dialog_cvpcb_config.cpp:181 #: cvpcb/dialog_cvpcb_config.cpp:185
msgid "Libraries" msgid "Libraries"
msgstr "Librairies" msgstr "Librairies"
...@@ -3827,7 +3828,7 @@ msgstr "Deselection" ...@@ -3827,7 +3828,7 @@ msgstr "Deselection"
msgid "Deselect this layer to restore its No Change state" msgid "Deselect this layer to restore its No Change state"
msgstr "Deselectionner cette couche pour restorer l'option Pas de Changement" msgstr "Deselectionner cette couche pour restorer l'option Pas de Changement"
#: pcbnew/moduleframe.cpp:177 #: pcbnew/moduleframe.cpp:178
msgid "Module Editor: module modified!, Continue ?" msgid "Module Editor: module modified!, Continue ?"
msgstr "Editeur de Module: module modifi! Continuer ?" msgstr "Editeur de Module: module modifi! Continuer ?"
...@@ -4326,6 +4327,10 @@ msgstr "&3D Visu" ...@@ -4326,6 +4327,10 @@ msgstr "&3D Visu"
msgid "&Help" msgid "&Help"
msgstr "&Aide" msgstr "&Aide"
#: pcbnew/class_marker.cpp:95
msgid "Marker Error Text"
msgstr "Texte du Marqueur d'erreurs"
#: pcbnew/globaleditpad.cpp:76 #: pcbnew/globaleditpad.cpp:76
msgid "Pads Global Edit" msgid "Pads Global Edit"
msgstr "Pads: Edition globale" msgstr "Pads: Edition globale"
...@@ -4803,7 +4808,6 @@ msgstr "KeyW: " ...@@ -4803,7 +4808,6 @@ msgstr "KeyW: "
#: eeschema/dialog_edit_component_in_lib.cpp:166 #: eeschema/dialog_edit_component_in_lib.cpp:166
#: eeschema/dialog_create_component.cpp:176 #: eeschema/dialog_create_component.cpp:176
#: eeschema/dialog_edit_component_in_schematic.cpp:204 #: eeschema/dialog_edit_component_in_schematic.cpp:204
#: cvpcb/dialog_display_options.h:50
msgid "Options" msgid "Options"
msgstr "Options" msgstr "Options"
...@@ -5692,52 +5696,52 @@ msgstr "" ...@@ -5692,52 +5696,52 @@ msgstr ""
msgid "Nothing found" msgid "Nothing found"
msgstr " Rien trouv" msgstr " Rien trouv"
#: eeschema/libframe.cpp:104 #: eeschema/libframe.cpp:105
msgid "LibEdit: Part modified!, Continue ?" msgid "LibEdit: Part modified!, Continue ?"
msgstr "LibEdit: composant modifi, Continuer ?" msgstr "LibEdit: composant modifi, Continuer ?"
#: eeschema/libframe.cpp:117 #: eeschema/libframe.cpp:118
#, c-format #, c-format
msgid "Library %s modified!, Continue ?" msgid "Library %s modified!, Continue ?"
msgstr "Librairie %s modifie!, Continuer ?" msgstr "Librairie %s modifie!, Continuer ?"
#: eeschema/libframe.cpp:343 #: eeschema/libframe.cpp:344
msgid "Include last component changes" msgid "Include last component changes"
msgstr "Inclure les dernieres modifs du composant" msgstr "Inclure les dernieres modifs du composant"
#: eeschema/libframe.cpp:406 #: eeschema/libframe.cpp:407
msgid " Tst Pins OK!" msgid " Tst Pins OK!"
msgstr " Test Pins OK!" msgstr " Test Pins OK!"
#: eeschema/libframe.cpp:480 #: eeschema/libframe.cpp:481
msgid "Add Pin" msgid "Add Pin"
msgstr "Addition de \"pins\"" msgstr "Addition de \"pins\""
#: eeschema/libframe.cpp:484 #: eeschema/libframe.cpp:485
msgid "Set Pin Opt" msgid "Set Pin Opt"
msgstr "Choix Options des pins" msgstr "Choix Options des pins"
#: eeschema/libframe.cpp:506 #: eeschema/libframe.cpp:507
msgid "Add Rectangle" msgid "Add Rectangle"
msgstr "Addition de rectangles" msgstr "Addition de rectangles"
#: eeschema/libframe.cpp:510 #: eeschema/libframe.cpp:511
msgid "Add Circle" msgid "Add Circle"
msgstr "Addition de cercle" msgstr "Addition de cercle"
#: eeschema/libframe.cpp:514 #: eeschema/libframe.cpp:515
msgid "Add Arc" msgid "Add Arc"
msgstr "Addition d' arc" msgstr "Addition d' arc"
#: eeschema/libframe.cpp:522 #: eeschema/libframe.cpp:523
msgid "Anchor" msgid "Anchor"
msgstr "Ancre" msgstr "Ancre"
#: eeschema/libframe.cpp:526 #: eeschema/libframe.cpp:527
msgid "Import" msgid "Import"
msgstr "Importer" msgstr "Importer"
#: eeschema/libframe.cpp:532 #: eeschema/libframe.cpp:533
msgid "Export" msgid "Export"
msgstr "Exporter" msgstr "Exporter"
...@@ -5997,26 +6001,26 @@ msgid "Display next part" ...@@ -5997,26 +6001,26 @@ msgid "Display next part"
msgstr "Afficher composant suivant" msgstr "Afficher composant suivant"
#: eeschema/tool_viewlib.cpp:70 #: eeschema/tool_viewlib.cpp:70
#: cvpcb/displayframe.cpp:119 #: cvpcb/displayframe.cpp:124
#: 3d-viewer/3d_toolbar.cpp:44 #: 3d-viewer/3d_toolbar.cpp:44
msgid "zoom + (F1)" msgid "zoom + (F1)"
msgstr "zoom + (F1)" msgstr "zoom + (F1)"
#: eeschema/tool_viewlib.cpp:74 #: eeschema/tool_viewlib.cpp:74
#: cvpcb/displayframe.cpp:122 #: cvpcb/displayframe.cpp:127
#: 3d-viewer/3d_toolbar.cpp:47 #: 3d-viewer/3d_toolbar.cpp:47
msgid "zoom - (F2)" msgid "zoom - (F2)"
msgstr "zoom - (F2)" msgstr "zoom - (F2)"
#: eeschema/tool_viewlib.cpp:78 #: eeschema/tool_viewlib.cpp:78
#: cvpcb/displayframe.cpp:125 #: cvpcb/displayframe.cpp:130
#: 3d-viewer/3d_toolbar.cpp:50 #: 3d-viewer/3d_toolbar.cpp:50
msgid "redraw (F3)" msgid "redraw (F3)"
msgstr "Redessin (F3)" msgstr "Redessin (F3)"
#: eeschema/tool_viewlib.cpp:82 #: eeschema/tool_viewlib.cpp:82
#: cvpcb/displayframe.cpp:128 #: cvpcb/displayframe.cpp:133
#: cvpcb/displayframe.cpp:132 #: cvpcb/displayframe.cpp:137
msgid "1:1 zoom" msgid "1:1 zoom"
msgstr "1:1 zoom" msgstr "1:1 zoom"
...@@ -6078,7 +6082,7 @@ msgstr "Librairie d ...@@ -6078,7 +6082,7 @@ msgstr "Librairie d
#: eeschema/eestatus.cpp:303 #: eeschema/eestatus.cpp:303
#: eeschema/dialog_eeschema_config.cpp:174 #: eeschema/dialog_eeschema_config.cpp:174
#: cvpcb/dialog_cvpcb_config.cpp:144 #: cvpcb/dialog_cvpcb_config.cpp:147
msgid "NetList Formats:" msgid "NetList Formats:"
msgstr " Formats NetListe:" msgstr " Formats NetListe:"
...@@ -7697,7 +7701,7 @@ msgid "Create &List" ...@@ -7697,7 +7701,7 @@ msgid "Create &List"
msgstr "Crer &Liste" msgstr "Crer &Liste"
#: eeschema/dialog_build_BOM.cpp:347 #: eeschema/dialog_build_BOM.cpp:347
#: cvpcb/dialog_display_options.cpp:199 #: cvpcb/dialog_display_options.cpp:195
msgid "&Apply" msgid "&Apply"
msgstr "&Appliquer" msgstr "&Appliquer"
...@@ -7869,7 +7873,7 @@ msgid "Retro ext:" ...@@ -7869,7 +7873,7 @@ msgid "Retro ext:"
msgstr "Retro ext:" msgstr "Retro ext:"
#: cvpcb/menucfg.cpp:285 #: cvpcb/menucfg.cpp:285
#: cvpcb/dialog_cvpcb_config.cpp:213 #: cvpcb/dialog_cvpcb_config.cpp:217
msgid "Equiv" msgid "Equiv"
msgstr "Equiv" msgstr "Equiv"
...@@ -7960,11 +7964,11 @@ msgstr "Impossible de cr ...@@ -7960,11 +7964,11 @@ msgstr "Impossible de cr
msgid "Load Net List" msgid "Load Net List"
msgstr "Lire Netliste" msgstr "Lire Netliste"
#: cvpcb/setvisu.cpp:43 #: cvpcb/setvisu.cpp:42
msgid "Footprint: " msgid "Footprint: "
msgstr "Module: " msgstr "Module: "
#: cvpcb/setvisu.cpp:46 #: cvpcb/setvisu.cpp:45
msgid "Lib: " msgid "Lib: "
msgstr "Lib: " msgstr "Lib: "
...@@ -8023,8 +8027,25 @@ msgstr "Choisir les fontes et leur taille pour les dialogues, infos et ligne d' ...@@ -8023,8 +8027,25 @@ msgstr "Choisir les fontes et leur taille pour les dialogues, infos et ligne d'
msgid "Netlist Format: Pcad" msgid "Netlist Format: Pcad"
msgstr " Format NetListe: Pcad" msgstr " Format NetListe: Pcad"
#: cvpcb/displayframe.cpp:114 #: cvpcb/dialog_cvpcb_config.cpp:135
msgid "Read Cfg"
msgstr "Lire Cfg"
#: cvpcb/dialog_cvpcb_config.cpp:144
msgid "&PcbNew"
msgstr "&PcbNew"
#: cvpcb/dialog_cvpcb_config.cpp:145
msgid "&ViewLogic"
msgstr "&ViewLogic"
#: cvpcb/dialog_cvpcb_config.cpp:146
msgid "View &Net + Pkg"
msgstr "View &Net + Pkg"
#: cvpcb/displayframe.cpp:119
#: pcbnew/dialog_display_options.h:43 #: pcbnew/dialog_display_options.h:43
#: cvpcb/dialog_display_options.h:51
msgid "Display Options" msgid "Display Options"
msgstr "Options d'affichage" msgstr "Options d'affichage"
...@@ -8037,41 +8058,6 @@ msgstr " Formats NetListe: EESchema" ...@@ -8037,41 +8058,6 @@ msgstr " Formats NetListe: EESchema"
msgid "Netlist error: %s" msgid "Netlist error: %s"
msgstr "Erreur Netliste: %s" msgstr "Erreur Netliste: %s"
#: cvpcb/dialog_display_options.cpp:151
#: cvpcb/dialog_display_options.cpp:159
msgid "&Line"
msgstr "&Ligne"
#: cvpcb/dialog_display_options.cpp:152
#: cvpcb/dialog_display_options.cpp:160
msgid "&Filled"
msgstr "&Plein"
#: cvpcb/dialog_display_options.cpp:153
#: cvpcb/dialog_display_options.cpp:161
msgid "&Sketch"
msgstr "&Contour"
#: cvpcb/dialog_display_options.cpp:154
msgid "Edges:"
msgstr "Contours:"
#: cvpcb/dialog_display_options.cpp:162
msgid "Texts:"
msgstr "Textes:"
#: cvpcb/dialog_display_options.cpp:169
msgid "&Pad Filled"
msgstr "&Pad plein"
#: cvpcb/dialog_display_options.cpp:173
msgid "Display Pad &Num"
msgstr "Afficher Numero de Pad"
#: cvpcb/dialog_display_options.cpp:176
msgid "Display pad number"
msgstr "Afficher numro des pastilles"
#: cvpcb/tool_cvpcb.cpp:35 #: cvpcb/tool_cvpcb.cpp:35
msgid "Open Netlist" msgid "Open Netlist"
msgstr "Lire Netliste" msgstr "Lire Netliste"
...@@ -8156,31 +8142,40 @@ msgstr "Sauver les options en r ...@@ -8156,31 +8142,40 @@ msgstr "Sauver les options en r
msgid "Open the cvpcb manual" msgid "Open the cvpcb manual"
msgstr "Ouvrir la documentation de cvpcb" msgstr "Ouvrir la documentation de cvpcb"
#: cvpcb/dialog_cvpcb_config.cpp:131 #: cvpcb/dialog_display_options.cpp:147
msgid "Read Cfg" #: cvpcb/dialog_display_options.cpp:155
msgstr "Lire Cfg" msgid "&Line"
msgstr "&Ligne"
#: cvpcb/dialog_cvpcb_config.cpp:140 #: cvpcb/dialog_display_options.cpp:148
msgid "&PcbNew" #: cvpcb/dialog_display_options.cpp:156
msgstr "&PcbNew" msgid "&Filled"
msgstr "&Plein"
#: cvpcb/dialog_cvpcb_config.cpp:141 #: cvpcb/dialog_display_options.cpp:149
msgid "&ViewLogic" #: cvpcb/dialog_display_options.cpp:157
msgstr "&ViewLogic" msgid "&Sketch"
msgstr "&Contour"
#: cvpcb/dialog_cvpcb_config.cpp:142 #: cvpcb/dialog_display_options.cpp:150
msgid "View &Net + Pkg" msgid "Edges:"
msgstr "View &Net + Pkg" msgstr "Contours:"
#: cvpcb/dialog_cvpcb_config.cpp:170 #: cvpcb/dialog_display_options.cpp:158
#: cvpcb/dialog_cvpcb_config.cpp:202 msgid "Texts:"
msgid "Add below" msgstr "Textes:"
msgstr "Ajout avant"
#: cvpcb/dialog_cvpcb_config.cpp:174 #: cvpcb/dialog_display_options.cpp:165
#: cvpcb/dialog_cvpcb_config.cpp:206 msgid "&Pad Filled"
msgid "Add above" msgstr "&Pad plein"
msgstr "Ajout aprs"
#: cvpcb/dialog_display_options.cpp:169
msgid "Display Pad &Num"
msgstr "Afficher Numero de Pad"
#: cvpcb/dialog_display_options.cpp:172
msgid "Display pad number"
msgstr "Afficher numro des pastilles"
#: kicad/preferences.cpp:33 #: kicad/preferences.cpp:33
msgid "Prefered Pdf Browser:" msgid "Prefered Pdf Browser:"
...@@ -9077,7 +9072,6 @@ msgid "Infos:" ...@@ -9077,7 +9072,6 @@ msgid "Infos:"
msgstr "Infos:" msgstr "Infos:"
#: common/selcolor.cpp:75 #: common/selcolor.cpp:75
#: share/selcolor.cpp:99
msgid "Colors" msgid "Colors"
msgstr "Couleurs" msgstr "Couleurs"
...@@ -9330,7 +9324,7 @@ msgstr "Liste tous" ...@@ -9330,7 +9324,7 @@ msgstr "Liste tous"
msgid "By Lib Browser" msgid "By Lib Browser"
msgstr "Par Visualisateur libs" msgstr "Par Visualisateur libs"
#: common/basicframe.cpp:217 #: common/basicframe.cpp:216
#, c-format #, c-format
msgid "Help file %s not found" msgid "Help file %s not found"
msgstr "Fichier d'aide %s non trouv" msgstr "Fichier d'aide %s non trouv"
...@@ -9696,11 +9690,11 @@ msgstr "" ...@@ -9696,11 +9690,11 @@ msgstr ""
msgid "font for info display" msgid "font for info display"
msgstr "fonte pour affichage infos" msgstr "fonte pour affichage infos"
#: share/drawframe.cpp:377 #: share/drawframe.cpp:385
msgid "Inch" msgid "Inch"
msgstr "Pouce" msgstr "Pouce"
#: share/drawframe.cpp:385 #: share/drawframe.cpp:393
msgid "??" msgid "??"
msgstr "??" msgstr "??"
...@@ -9732,7 +9726,6 @@ msgstr "Chercher" ...@@ -9732,7 +9726,6 @@ msgstr "Chercher"
#: pcbnew/dialog_setup_libs.h:43 #: pcbnew/dialog_setup_libs.h:43
#: eeschema/dialog_edit_label.h:40 #: eeschema/dialog_edit_label.h:40
#: eeschema/dialog_eeschema_config.h:50 #: eeschema/dialog_eeschema_config.h:50
#: cvpcb/dialog_cvpcb_config.h:39
msgid "Dialog" msgid "Dialog"
msgstr "Dialog" msgstr "Dialog"
...@@ -9949,6 +9942,10 @@ msgstr "Propri ...@@ -9949,6 +9942,10 @@ msgstr "Propri
msgid "Component properties" msgid "Component properties"
msgstr "Proprits du composant" msgstr "Proprits du composant"
#: cvpcb/dialog_cvpcb_config.h:50
msgid "Cvpcb Configuration"
msgstr "Configuration de Cvpcb"
#: gerbview/set_color.h:5 #: gerbview/set_color.h:5
msgid "Layers 1-16" msgid "Layers 1-16"
msgstr "Couches 1-16" msgstr "Couches 1-16"
...@@ -10093,14 +10090,15 @@ msgstr "Autres" ...@@ -10093,14 +10090,15 @@ msgstr "Autres"
msgid "D codes id." msgid "D codes id."
msgstr "DCodes id." msgstr "DCodes id."
#: share/setpage.h:54 #: common/svg_print.h:52
msgid "Page Settings"
msgstr "Ajustage opt Page"
#: share/svg_print.h:50 #: share/svg_print.h:50
msgid "Create SVG file" msgid "Create SVG file"
msgstr "Crer Fichier SVG" msgstr "Crer Fichier SVG"
#: share/setpage.h:54
msgid "Page Settings"
msgstr "Ajustage opt Page"
#: share/dialog_print.h:51 #: share/dialog_print.h:51
msgid "Print" msgid "Print"
msgstr "Imprimer" msgstr "Imprimer"
......
...@@ -69,6 +69,9 @@ WinEDA_BasePcbFrame::~WinEDA_BasePcbFrame( void ) ...@@ -69,6 +69,9 @@ WinEDA_BasePcbFrame::~WinEDA_BasePcbFrame( void )
/**************************************/ /**************************************/
int WinEDA_BasePcbFrame::BestZoom( void ) int WinEDA_BasePcbFrame::BestZoom( void )
/**************************************/ /**************************************/
/**
* Return the "best" zoom, i.e. the zoom which shows the entire borad on screen
*/
{ {
int dx, dy, ii, jj; int dx, dy, ii, jj;
int bestzoom; int bestzoom;
...@@ -79,7 +82,6 @@ int WinEDA_BasePcbFrame::BestZoom( void ) ...@@ -79,7 +82,6 @@ int WinEDA_BasePcbFrame::BestZoom( void )
m_Pcb->ComputeBoundaryBox(); m_Pcb->ComputeBoundaryBox();
/* calcul du zoom montrant tout le dessim */
dx = m_Pcb->m_BoundaryBox.GetWidth(); dx = m_Pcb->m_BoundaryBox.GetWidth();
dy = m_Pcb->m_BoundaryBox.GetHeight(); dy = m_Pcb->m_BoundaryBox.GetHeight();
......
...@@ -14,21 +14,21 @@ ...@@ -14,21 +14,21 @@
#include "protos.h" #include "protos.h"
/* Constantes de controle de l'affichage des messages */ /* Position of messages on the bottom display */
#define AFFICHE 1 #define AFFICHE 1
#define POS_AFF_PASSE 40 #define POS_AFF_PASSE 40
#define POS_AFF_VAR 50 #define POS_AFF_VAR 50
#define POS_AFF_MAX 60 #define POS_AFF_MAX 60
#define POS_AFF_NUMSEGM 70 #define POS_AFF_NUMSEGM 70
/* Routines locales : */ /* local functions : */
static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC ); static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC );
static void DeleteUnconnectedTracks( WinEDA_PcbFrame* frame, wxDC* DC ); static void DeleteUnconnectedTracks( WinEDA_PcbFrame* frame, wxDC* DC );
static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extremite ); static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extremite );
static void Clean_Pcb_Items( WinEDA_PcbFrame* frame, wxDC* DC ); static void Clean_Pcb_Items( WinEDA_PcbFrame* frame, wxDC* DC );
/* Variables locales : */ /* Local Variables: */
static bool a_color; /* couleur du message */ static bool a_color; /* message color */
static bool s_CleanVias = true; static bool s_CleanVias = true;
static bool s_MergeSegments = true; static bool s_MergeSegments = true;
static bool s_DeleteUnconnectedSegm = true; static bool s_DeleteUnconnectedSegm = true;
...@@ -48,13 +48,8 @@ static void Gen_Raccord_Track( WinEDA_PcbFrame* frame, wxDC* DC ); ...@@ -48,13 +48,8 @@ static void Gen_Raccord_Track( WinEDA_PcbFrame* frame, wxDC* DC );
/*****************************************/ /*****************************************/
void WinEDA_PcbFrame::Clean_Pcb( wxDC* DC ) void WinEDA_PcbFrame::Clean_Pcb( wxDC* DC )
/*****************************************/ /*****************************************/
/* Install the track operation dialog frame
/* Regroupement des segments de meme piste. */
* Suppression des points inutiles
* - via sur pad
* - points de couche et coord identiques
* - points alignes (supp du pt milieu)
*/
{ {
s_ConnectToPads = false; s_ConnectToPads = false;
WinEDA_CleaningOptionsFrame* frame = new WinEDA_CleaningOptionsFrame( this, DC ); WinEDA_CleaningOptionsFrame* frame = new WinEDA_CleaningOptionsFrame( this, DC );
...@@ -67,6 +62,15 @@ void WinEDA_PcbFrame::Clean_Pcb( wxDC* DC ) ...@@ -67,6 +62,15 @@ void WinEDA_PcbFrame::Clean_Pcb( wxDC* DC )
/************************************************************/ /************************************************************/
void Clean_Pcb_Items( WinEDA_PcbFrame* frame, wxDC* DC ) void Clean_Pcb_Items( WinEDA_PcbFrame* frame, wxDC* DC )
/************************************************************/ /************************************************************/
/* Main cleaning function.
* Delete
* - Redundant points on tracks (merge aligned segments)
* - vias on pad
* - null segments
* - Redundant segments
* Create segments when track ends are incorrecty connected:
* i.e. when a track end covers a pad or a via but is not exactly on the pad or the via center
*/
{ {
frame->MsgPanel->EraseMsgBox(); frame->MsgPanel->EraseMsgBox();
frame->m_Pcb->GetNumSegmTrack(); // update the count frame->m_Pcb->GetNumSegmTrack(); // update the count
...@@ -446,9 +450,9 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC ) ...@@ -446,9 +450,9 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
} }
} }
/****************************/ /*******************************/
/* delete intermediate points */ /* delete intermediate points */
/****************************/ /*******************************/
nbpoints_supprimes = 0; nbpoints_supprimes = 0;
percent = 0; percent = 0;
...@@ -489,7 +493,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC ) ...@@ -489,7 +493,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
flag = no_inc = 0; flag = no_inc = 0;
// search for a possible point that connects on START of segment // search for a possible point that connects on the START point of the segment
for( segStart = segment->Next(); ; ) for( segStart = segment->Next(); ; )
{ {
segStart = Locate_Piste_Connectee( segment, segStart, segStart = Locate_Piste_Connectee( segment, segStart,
...@@ -504,7 +508,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC ) ...@@ -504,7 +508,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
if( segStart->Type() != TYPETRACK ) if( segStart->Type() != TYPETRACK )
break; break;
/* On ne peut avoir que 1 seul segment connecte */ /* We must have only one segment connected */
segStart->SetState( BUSY, ON ); segStart->SetState( BUSY, ON );
other = Locate_Piste_Connectee( segment, frame->m_Pcb->m_Track, other = Locate_Piste_Connectee( segment, frame->m_Pcb->m_Track,
NULL, START ); NULL, START );
...@@ -518,7 +522,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC ) ...@@ -518,7 +522,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
break; break;
} }
if( flag ) /* debut de segment raccorde a un autre segment */ if( flag ) /* We have the starting point of the segment is connecte to an other segment */
{ {
segDelete = AlignSegment( frame->m_Pcb, segment, segStart, START ); segDelete = AlignSegment( frame->m_Pcb, segment, segStart, START );
if( segDelete ) if( segDelete )
...@@ -528,7 +532,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC ) ...@@ -528,7 +532,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
} }
} }
/* Recherche d'un point possible raccorde sur FIN de segment: */ /* search for a possible point that connects on the END point of the segment: */
for( segEnd = segment->Next(); ; ) for( segEnd = segment->Next(); ; )
{ {
segEnd = Locate_Piste_Connectee( segment, segEnd, NULL, END ); segEnd = Locate_Piste_Connectee( segment, segEnd, NULL, END );
...@@ -540,7 +544,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC ) ...@@ -540,7 +544,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
if( segEnd->Type() != TYPETRACK ) if( segEnd->Type() != TYPETRACK )
break; break;
/* On ne peut avoir que 1 seul segment connecte */ /* We must have only one segment connected */
segEnd->SetState( BUSY, ON ); segEnd->SetState( BUSY, ON );
other = Locate_Piste_Connectee( segment, frame->m_Pcb->m_Track, other = Locate_Piste_Connectee( segment, frame->m_Pcb->m_Track,
NULL, END ); NULL, END );
...@@ -555,7 +559,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC ) ...@@ -555,7 +559,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
break; break;
} }
if( flag & 2 ) /* FIN de segment raccorde a un autre segment */ if( flag & 2 ) /* We have the ending point of the segment is connecte to an other segment */
{ {
segDelete = AlignSegment( frame->m_Pcb, segment, segEnd, END ); segDelete = AlignSegment( frame->m_Pcb, segment, segEnd, END );
if( segDelete ) if( segDelete )
...@@ -566,7 +570,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC ) ...@@ -566,7 +570,7 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
} }
} }
if( no_inc ) /* Le segment en cours a ete modifie, il faut le reexaminer */ if( no_inc ) /* The current segment was modified, retry to merge it */
{ {
msg.Printf( wxT( "%d " ), nbpoints_supprimes ); msg.Printf( wxT( "%d " ), nbpoints_supprimes );
Affiche_1_Parametre( frame, POS_AFF_VAR, wxEmptyString, msg, a_color ); Affiche_1_Parametre( frame, POS_AFF_VAR, wxEmptyString, msg, a_color );
...@@ -582,18 +586,16 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC ) ...@@ -582,18 +586,16 @@ static int clean_segments( WinEDA_PcbFrame* frame, wxDC* DC )
/****************************************************************************/ /****************************************************************************/
static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extremite ) static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extremite )
/****************************************************************************/ /****************************************************************************/
/* Function used by clean_segments.
/** * Test alignement of pt_segm and pt_ref (which must have acommon end).
* Function AlignSegment * and see if the common point is not on a pad (i.e. if this common point can be removed).
*/ * the ending point of pt_ref is the start point (extremite == START)
* or the end point (extremite == FIN)
/* Routine utilisee par clean_segments. * if the common end can be deleted, this function
* Verifie l'alignement de pt_segm / pt_ref. et verifie que le point commun * change the common point coordinate of the pt_ref segm
* a faire disparaitre n'est pas sur un pad. * (and therefore connect the 2 other ending points)
* l'extremite testee est debut (extremite == START) ou fin (extremite == FIN) * and return pt_segm (which can be deleted).
* si il y a alignement, modifie les coord d'extremite de pt_ref et retourne * else return NULL
* pt_segm.
* sinon retourne NULL
*/ */
{ {
int flag = 0; int flag = 0;
...@@ -604,7 +606,7 @@ static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extre ...@@ -604,7 +606,7 @@ static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extre
int segmdx = pt_segm->m_End.x - pt_segm->m_Start.x; int segmdx = pt_segm->m_End.x - pt_segm->m_Start.x;
int segmdy = pt_segm->m_End.y - pt_segm->m_Start.y; int segmdy = pt_segm->m_End.y - pt_segm->m_Start.y;
// test for vertical alignment // test for vertical alignment (easy to handle)
if( refdx == 0 ) if( refdx == 0 )
{ {
if( segmdx != 0 ) if( segmdx != 0 )
...@@ -613,7 +615,7 @@ static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extre ...@@ -613,7 +615,7 @@ static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extre
flag = 1; flag = 1;
} }
// test for horizontal alignment // test for horizontal alignment (easy to handle)
if( refdy == 0 ) if( refdy == 0 )
{ {
if( segmdy != 0 ) if( segmdy != 0 )
...@@ -622,8 +624,8 @@ static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extre ...@@ -622,8 +624,8 @@ static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extre
flag = 2; flag = 2;
} }
/* tst si il y a alignement d'angle qcq /* tst if alignement in other cases
* il faut que refdy/refdx == (+/-)segmdy/segmdx, c.a.d meme direction */ * We must have refdy/refdx == (+/-)segmdy/segmdx, (i.e. same orientation) */
if( flag == 0 ) if( flag == 0 )
{ {
if( (refdy * segmdx != refdx * segmdy) if( (refdy * segmdx != refdx * segmdy)
...@@ -632,21 +634,26 @@ static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extre ...@@ -632,21 +634,26 @@ static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extre
flag = 4; flag = 4;
} }
/* Ici il y a alignement: il faut determiner les positions relatives /* Here we have 2 aligned segments:
* pour supprimer le point commun et le remplacer */ We must change the pt_ref common point only if not on a pad
(this function) is called when thre is only 2 connected segments,
and if this point is not on a pad, it can be removed and the 2 segments will be merged
*/
if( extremite == START ) if( extremite == START )
{ {
/* Ce ne doit pas etre sur un pad */ /* We do not have a pad */
if( Fast_Locate_Pad_Connecte( Pcb, pt_ref->m_Start, if( Fast_Locate_Pad_Connecte( Pcb, pt_ref->m_Start,
g_TabOneLayerMask[pt_ref->GetLayer()] ) ) g_TabOneLayerMask[pt_ref->GetLayer()] ) )
return NULL; return NULL;
/* change the common point coordinate of pt_segm tu use the other point
of pt_segm (pt_segm will be removed later) */
if( pt_ref->m_Start == pt_segm->m_Start ) if( pt_ref->m_Start == pt_segm->m_Start )
{ {
pt_ref->m_Start = pt_segm->m_End; pt_ref->m_Start = pt_segm->m_End;
return pt_segm; return pt_segm;
} }
else /* connexion par la fin de pt_segm */ else
{ {
pt_ref->m_Start = pt_segm->m_Start; pt_ref->m_Start = pt_segm->m_Start;
return pt_segm; return pt_segm;
...@@ -654,17 +661,19 @@ static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extre ...@@ -654,17 +661,19 @@ static TRACK* AlignSegment( BOARD* Pcb, TRACK* pt_ref, TRACK* pt_segm, int extre
} }
else /* extremite == END */ else /* extremite == END */
{ {
/* Ce ne doit pas etre sur un pad */ /* We do not have a pad */
if( Fast_Locate_Pad_Connecte( Pcb, pt_ref->m_End, if( Fast_Locate_Pad_Connecte( Pcb, pt_ref->m_End,
g_TabOneLayerMask[pt_ref->GetLayer()] ) ) g_TabOneLayerMask[pt_ref->GetLayer()] ) )
return NULL; return NULL;
/* change the common point coordinate of pt_segm tu use the other point
of pt_segm (pt_segm will be removed later) */
if( pt_ref->m_End == pt_segm->m_Start ) if( pt_ref->m_End == pt_segm->m_Start )
{ {
pt_ref->m_End = pt_segm->m_End; pt_ref->m_End = pt_segm->m_End;
return pt_segm; return pt_segm;
} }
else /* connexion par la fin de pt_segm */ else
{ {
pt_ref->m_End = pt_segm->m_Start; pt_ref->m_End = pt_segm->m_Start;
return pt_segm; return pt_segm;
...@@ -768,7 +777,7 @@ int Netliste_Controle_piste( WinEDA_PcbFrame* frame, wxDC* DC, int affiche ) ...@@ -768,7 +777,7 @@ int Netliste_Controle_piste( WinEDA_PcbFrame* frame, wxDC* DC, int affiche )
} }
} }
// suppression of segments // Removal of flagged segments
for( segment = frame->m_Pcb->m_Track; segment; segment = next ) for( segment = frame->m_Pcb->m_Track; segment; segment = next )
{ {
next = (TRACK*) segment->Next(); next = (TRACK*) segment->Next();
...@@ -810,13 +819,6 @@ static void Gen_Raccord_Track( WinEDA_PcbFrame* frame, wxDC* DC ) ...@@ -810,13 +819,6 @@ static void Gen_Raccord_Track( WinEDA_PcbFrame* frame, wxDC* DC )
* segment first being operated on. This is done so that the subsequent tests * segment first being operated on. This is done so that the subsequent tests
* of connection, which do not test segment overlaps, will see this continuity. * of connection, which do not test segment overlaps, will see this continuity.
*/ */
/* Teste les extremites de segments :
* si une extremite est sur un segment de piste, mais pas sur une extremite,
* le segment est coupe en 2, le point de coupure etant l'extremite du segment
* Ceci est fait pour que les tests de connexion qui ne testent que les extremites
* de segments voient la connexion
*/
{ {
TRACK* segment; TRACK* segment;
TRACK* other; TRACK* other;
......
...@@ -92,6 +92,14 @@ const KICAD_T GENERAL_COLLECTOR::PadsOrModules[] = { ...@@ -92,6 +92,14 @@ const KICAD_T GENERAL_COLLECTOR::PadsOrModules[] = {
EOT EOT
}; };
const KICAD_T GENERAL_COLLECTOR::ModulesAndTheirItems[] = {
TYPETEXTEMODULE,
TYPEEDGEMODULE,
TYPEPAD,
TYPEMODULE,
EOT
};
const KICAD_T GENERAL_COLLECTOR::Tracks[] = { const KICAD_T GENERAL_COLLECTOR::Tracks[] = {
TYPETRACK, TYPETRACK,
......
...@@ -226,6 +226,11 @@ public: ...@@ -226,6 +226,11 @@ public:
*/ */
static const KICAD_T PadsOrModules[]; static const KICAD_T PadsOrModules[];
/**
* A scan list for MODULEs and their items (for Modedit)
*/
static const KICAD_T ModulesAndTheirItems[];
/** /**
* A scan list for only TRACKS * A scan list for only TRACKS
......
...@@ -17,29 +17,111 @@ ...@@ -17,29 +17,111 @@
#include "protos.h" #include "protos.h"
#include "id.h" #include "id.h"
#include "collectors.h"
/*********************************************************************/ /****************************************************************************/
BOARD_ITEM* WinEDA_ModuleEditFrame::ModeditLocateAndDisplay() BOARD_ITEM* WinEDA_ModuleEditFrame::ModeditLocateAndDisplay( int aHotKeyCode )
/*********************************************************************/ /****************************************************************************/
{ {
BOARD_ITEM* DrawStruct = GetCurItem(); BOARD_ITEM* item = GetCurItem();
MODULE* Module = m_Pcb->m_Modules; MODULE* Module = m_Pcb->m_Modules;
if( Module == NULL ) if( Module == NULL )
return NULL; return NULL;
DrawStruct = Locate_Edge_Module( Module, CURSEUR_OFF_GRILLE ); GENERAL_COLLECTORS_GUIDE guide = GetCollectorsGuide();
if( DrawStruct )
// Assign to scanList the proper item types desired based on tool type
// or hotkey that is in play.
const KICAD_T* scanList = NULL;
if( aHotKeyCode )
{ {
DrawStruct->Display_Infos( this ); // @todo: add switch here and add calls to PcbGeneralLocateAndDisplay( int aHotKeyCode )
// when searching is needed from a hotkey handler
} }
else else
DrawStruct = Locate( CURSEUR_OFF_GRILLE, -1 ); {
scanList = GENERAL_COLLECTOR::ModulesAndTheirItems;
}
m_Collector->Collect( m_Pcb, scanList, GetScreen()->RefPos( true ), guide );
/* Remove redundancies: when an item is found, we can remove the
* module from list
*/
if( m_Collector->GetCount() > 1 )
{
for( int ii = 0; ii < m_Collector->GetCount(); ii++ )
{
item = (*m_Collector)[ii];
if( item->Type() != TYPEMODULE )
continue;
m_Collector->Remove( ii );
ii--;
}
}
if( m_Collector->GetCount() <= 1 )
{
item = (*m_Collector)[0];
SetCurItem( item );
}
else // we can't figure out which item user wants, do popup menu so user can choose
{
wxMenu itemMenu;
/* Give a title to the selection menu. This is also a cancel menu item */
wxMenuItem * item_title = new wxMenuItem(&itemMenu, -1, _( "Selection Clarification" ) );
#ifdef __WINDOWS__
wxFont bold_font(*wxNORMAL_FONT);
bold_font.SetWeight(wxFONTWEIGHT_BOLD);
bold_font.SetStyle( wxFONTSTYLE_ITALIC);
item_title->SetFont(bold_font);
#endif
itemMenu.Append(item_title);
itemMenu.AppendSeparator();
int limit = MIN( MAX_ITEMS_IN_PICKER, m_Collector->GetCount() );
for( int ii = 0; ii<limit; ++ii )
{
wxString text;
const char** xpm;
item = (*m_Collector)[ii];
text = item->MenuText( m_Pcb );
xpm = item->MenuIcon();
ADD_MENUITEM( &itemMenu, ID_POPUP_PCB_ITEM_SELECTION_START + ii, text, xpm );
}
// this menu's handler is void WinEDA_BasePcbFrame::ProcessItemSelection()
// and it calls SetCurItem() which in turn calls Display_Infos() on the item.
DrawPanel->m_AbortRequest = true; // changed in false if an item
PopupMenu( &itemMenu ); // m_AbortRequest = false if an item is selected
DrawPanel->MouseToCursorSchema();
return DrawStruct; DrawPanel->m_IgnoreMouseEvents = FALSE;
// The function ProcessItemSelection() has set the current item, return it.
item = GetCurItem();
}
if( item )
{
item->Display_Infos( this );
}
return item;
} }
/****************************************************************************/ /****************************************************************************/
void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event ) void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
/****************************************************************************/ /****************************************************************************/
......
...@@ -74,6 +74,8 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -74,6 +74,8 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
DrawStruct = GetCurItem(); DrawStruct = GetCurItem();
if( !DrawStruct || (DrawStruct->m_Flags == 0) ) if( !DrawStruct || (DrawStruct->m_Flags == 0) )
{ {
if( !wxGetKeyState(WXK_SHIFT) && !wxGetKeyState(WXK_ALT) &&
!wxGetKeyState(WXK_CONTROL) )
DrawStruct = ModeditLocateAndDisplay(); DrawStruct = ModeditLocateAndDisplay();
SetCurItem( DrawStruct ); SetCurItem( DrawStruct );
} }
......
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
/* class WinEDA_ModuleEditFrame */ /* class WinEDA_ModuleEditFrame */
/********************************/ /********************************/
BEGIN_EVENT_TABLE( WinEDA_ModuleEditFrame, wxFrame ) BEGIN_EVENT_TABLE( WinEDA_ModuleEditFrame, wxFrame )
COMMON_EVENTS_DRAWFRAME EVT_MENU_RANGE( ID_POPUP_PCB_ITEM_SELECTION_START,
ID_POPUP_PCB_ITEM_SELECTION_END,
WinEDA_BasePcbFrame::ProcessItemSelection )
COMMON_EVENTS_DRAWFRAME EVT_CLOSE( WinEDA_ModuleEditFrame::OnCloseWindow ) COMMON_EVENTS_DRAWFRAME EVT_CLOSE( WinEDA_ModuleEditFrame::OnCloseWindow )
EVT_SIZE( WinEDA_ModuleEditFrame::OnSize ) EVT_SIZE( WinEDA_ModuleEditFrame::OnSize )
......
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