From f6656e03849abcef00b0b623040448abfe254592 Mon Sep 17 00:00:00 2001 From: charras Date: Thu, 28 Jan 2010 13:10:46 +0000 Subject: [PATCH] fixed eeschema crash when using the hotkey m (move) command. Pcbnew :added option to show/hide footprints values and/or references --- CHANGELOG.txt | 6 ++++ common/CMakeLists.txt | 1 - eeschema/eelayer.cpp | 4 --- eeschema/eelayer.h | 4 --- eeschema/hotkeys.cpp | 6 ++-- include/pcbstruct.h | 2 ++ internat/fr/kicad.mo | Bin 224456 -> 224457 bytes internat/fr/kicad.po | 4 +-- pcbnew/build_BOM_from_board.cpp | 30 ++++++++++--------- pcbnew/class_module.cpp | 17 +++++++---- pcbnew/pcbframe.cpp | 4 ++- pcbnew/protos.h | 17 ----------- pcbnew/tracemod.cpp | 51 -------------------------------- pcbnew/tracepcb.cpp | 41 +++++++++++++++++++++++++ 14 files changed, 85 insertions(+), 102 deletions(-) delete mode 100644 pcbnew/tracemod.cpp diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4e259c23d7..16451ab031 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,12 @@ KiCad ChangeLog 2010 Please add newer entries at the top, list the date and your name with email address. +2010-Jan-28 UPDATE Jean-Pierre Charras +================================================================================ + *fixed eeschema crash when using the hotkey m (move) command. +* Pcbnew :added option to show/hide footprints values and/or references + See if show/hide footprints texts option is now always useful. + 2010-Jan-27 UPDATE Jean-Pierre Charras ================================================================================ ++ Pcbnew: diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index c583c98b42..bbd0b9a406 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -83,7 +83,6 @@ set(PCB_COMMON_SRCS ../pcbnew/classpcb.cpp ../pcbnew/collectors.cpp ../pcbnew/sel_layer.cpp - ../pcbnew/tracemod.cpp ) add_library(pcbcommon ${PCB_COMMON_SRCS}) diff --git a/eeschema/eelayer.cpp b/eeschema/eelayer.cpp index f6e0f6ba25..ae47f9f805 100644 --- a/eeschema/eelayer.cpp +++ b/eeschema/eelayer.cpp @@ -5,10 +5,6 @@ /* Set up color Layers for EESchema */ -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma implementation "eelayer.h" -#endif - #include "fctsys.h" #include "gr_basic.h" #include "common.h" diff --git a/eeschema/eelayer.h b/eeschema/eelayer.h index befef7d6e6..7e5bfc5cfa 100644 --- a/eeschema/eelayer.h +++ b/eeschema/eelayer.h @@ -5,10 +5,6 @@ #ifndef _EELAYER_H_ #define _EELAYER_H_ -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "eelayer.cpp" -#endif - #include "wx/statline.h" class wxBoxSizer; diff --git a/eeschema/hotkeys.cpp b/eeschema/hotkeys.cpp index 015d03d21d..6fe1324b99 100644 --- a/eeschema/hotkeys.cpp +++ b/eeschema/hotkeys.cpp @@ -468,6 +468,8 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, break; if( DrawStruct->Type() == TYPE_SCH_COMPONENT ) DrawStruct = LocateSmallestComponent( GetScreen() ); + if( DrawStruct == NULL ) + break; if( DrawStruct->Type() == DRAW_SHEET_STRUCT_TYPE ){ // If it's a sheet, then check if a pinsheet is under the cursor SCH_SHEET_PIN* slabel = LocateSheetLabel( (SCH_SHEET*) DrawStruct, @@ -477,10 +479,8 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey, } if (DrawStruct->Type() == DRAW_JUNCTION_STRUCT_TYPE){ // If it's a junction, pick the underlying wire instead - DrawStruct = PickStruct( GetScreen()->m_Curseur, - GetScreen(), WIREITEM); + DrawStruct = PickStruct( GetScreen()->m_Curseur, GetScreen(), WIREITEM); } - if( DrawStruct == NULL ) break; } diff --git a/include/pcbstruct.h b/include/pcbstruct.h index dc92e4174a..d46da3d98a 100644 --- a/include/pcbstruct.h +++ b/include/pcbstruct.h @@ -178,6 +178,8 @@ enum PCB_VISIBLE NO_CONNECTS_VISIBLE, ///< show a marker on pads with no nets MOD_FR_VISIBLE, ///< show modules on front MOD_BK_VISIBLE, ///< show modules on back + MOD_VALUES_VISIBLE, ///< show modules values (when texts are visibles) + MOD_REFERENCES_VISIBLE, ///< show modules references (when texts are visibles) END_VISIBLE // sentinel }; diff --git a/internat/fr/kicad.mo b/internat/fr/kicad.mo index f8e9806c61eecec018002ab174d463a2c6ce23d5..2c333bf102d268f5e1959554f53dfa88c0ffd60d 100644 GIT binary patch delta 9298 zcmXZgd7RJH{=o6C`C39GBU@tTjznh47^AT^WhvXp(kNSt?D@4_w9ZEq$#yH{$}Qoc zu5v4-{7Rx#DwUh7q!hYsLUh~QY1iN4z9E$64BG$(<_JsRgF^l>zJOxMM3HayeZCFHoCi>iqcs6dpY&?LivC`hG zR8uV2o0X&*Q0U7AAG``%;lfyd8BeEv5IbPKeWAlLtV?|e*1!pP5>Ccucqi7zm1xIn zu_nHSwQxH&#=ZNJFq30ku;c76voZtfg1&e$`rvrX$2+2H&;jp`_iO(E3Uuj~$NGDiL;VQ)UiQ~n zsmxYlb?RNPDqetgT!ts(D0G06(Jf4Fr{LZ%!V_^VR>4=$1~#Kh`ySfCZgge7iXKH9 zs{KuPzBw90tf~4Ms$U09SB>Niw0{ebjAA|AphOFE4lC@UWXN!e=yAa33Pz#umE2{2XqL} zz)FWgu(d)P>=+$@c03M!{#G<5=A#pP7+tX^4w3&p@H`jH=eMH2q7AnEAuH7z&qagn zZgd6aqXWASoxnqAhpW*o+=QMRJJ1;)M)N)UaJb$9y*@ahV02GGUwjBXAfClP;Z`ig zAJDWaJd%|<70*WpHWG_)723gPXm+H34A#Wv)U(lcOVF7QM6)RwLBS;%j}37Ox>O6| z^`+>8tI?VMKRWZxXhYl3;QSQbqVLd^X!xJ3)D+B*uE3$x8~>D*>V=b$=aSS$3eNOH z9ELyR2psrxI69w3J9rE2U6|C}Gc&{$HGA%H(W$1vD2p4Q%BRZqE(V2gYF720SIv$SKPdFB?*F&%8qVJcWTh|SZg&{Z? zZ$T&Y0ow6iwBP;5$p20hYWxv8?uqW%VDx8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*6kMX#=+EYO zbR}*_2ec4v=&9&G(WUd}?>2wkZ|(W;}u3N(zi zM$$S>x=}D{uSOeK93NPPX2E83@3x|QwjGU;53nsBjn|7W3Tak`KGz3*e;{UX7~0M# zbbw>9n)!cYwm^_XZ;#H2-V?n)x)|N#<>-K)if)S6x1lStE7re^_kTq9zRJa60FChk z^S_vaBkP4m@pWtaNBd&^XLQC#(d;?qk71xi==VfN?22Qe z4`W)!g)b?TVDn2t@C`LePDRsb2HL?~G;0>1OS=MHiO0|xzJMByBW;FTl0}V!p8z-U<7R7p7w1b{F5&NJ)_zV`|5gdxGF3lw8V~Tz89dv+=#)K6u zLbItDJwf}R=fvnSX;|uMTyRh4p(9^}&g3aHzu!a$_HFbKx@EsakD@D7ZEX0ny$*W6 zEZPPAaqEo^Xd?eI3-?~9_xQWW8gkC${$Ae{C%|HPtk#XiLTHQ^tohQXs-lo zQ#}XWnhGq%;pq8s7xu$+Ed@KOc3D_~`q+_r0XouAXz)!&zl7$a&%c4j$S!ndhp;B* zj1T6b13NL+PeR`-jCMd)G)>N>;EXEJ8D4-!`ABrHrp5dBqkH-g8iY?`KCVS)_7OVM zx|fGNZ-#bQfDW)7xylOgWm*nU|Z0Ey@jUdPILgf&;fpq z#>nsJK$=bnzk)-ebI@PSSED&sgjni=W#)e`3dX=REWp`lhmS{}MF+AGox!WdeG&#Fn80t3X%avgq|_Ox%HP)dFm3M@!>{m1sv#qcdEGuFNYlYHWC}#)c}7 i4XxfGzoc!alIPad%eiS=wX3fjJ!$N7{I8+8bN&bJXUNC^ diff --git a/internat/fr/kicad.po b/internat/fr/kicad.po index b8d5885267..5a6d2ed0f0 100644 --- a/internat/fr/kicad.po +++ b/internat/fr/kicad.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: kicad\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-01-27 21:22+0100\n" -"PO-Revision-Date: 2010-01-27 21:23+0100\n" +"PO-Revision-Date: 2010-01-28 11:33+0100\n" "Last-Translator: \n" "Language-Team: kicad team \n" "MIME-Version: 1.0\n" @@ -7484,7 +7484,7 @@ msgstr "Pin" #: eeschema/class_pin.cpp:1609 msgid "Number" -msgstr "Nombre" +msgstr "Numéro" #: eeschema/database.cpp:49 msgid "No components found matching " diff --git a/pcbnew/build_BOM_from_board.cpp b/pcbnew/build_BOM_from_board.cpp index 6c548a9a85..bef35c7419 100644 --- a/pcbnew/build_BOM_from_board.cpp +++ b/pcbnew/build_BOM_from_board.cpp @@ -97,30 +97,29 @@ void WinEDA_PcbFrame::RecreateBOMFileFromBoard( wxCommandEvent& aEvent ) cmp* comp = NULL; CmpList::iterator iter; int i = 1; - for( ; Module != NULL; Module = Module->Next() ) + while (Module != NULL) { bool valExist = false; - if( comp != NULL ) + // try to find component in existing list + for( iter = list.begin(); iter != list.end(); iter++ ) { - for( iter = list.begin(); iter != list.end(); iter++ ) + cmp* current = *iter; + if( (current->m_Val == Module->m_Value->m_Text) && (current->m_Pkg == Module->m_LibRef) ) { - cmp* current = *iter; - if( (current->m_Val == Module->m_Value->m_Text) && (current->m_Pkg == Module->m_LibRef) ) - { - current->m_Ref.Append( wxT( ", " ), 1 ); - current->m_Ref.Append( Module->m_Reference->m_Text ); - comp->m_CmpCount++; + current->m_Ref.Append( wxT( ", " ), 1 ); + current->m_Ref.Append( Module->m_Reference->m_Text ); + current->m_CmpCount++; - valExist = true; - break; - } + valExist = true; + break; } } - if( !valExist || (comp == NULL) ) + // If component does not exist yet, create new one and append it to the list. + if( valExist == false ) { - comp = new cmp(); + comp = new cmp(); comp->m_Id = i++; comp->m_Val = Module->m_Value->m_Text; comp->m_Ref = Module->m_Reference->m_Text; @@ -128,6 +127,9 @@ void WinEDA_PcbFrame::RecreateBOMFileFromBoard( wxCommandEvent& aEvent ) comp->m_CmpCount = 1; list.Append( comp ); } + + // increment module + Module = Module->Next(); } // Print list diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 22f907022f..432eba5c78 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -70,7 +70,7 @@ void MODULE::DrawAncre( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset GRSetDrawMode( DC, draw_mode ); - if( g_DesignSettings.IsElementVisible( ANCHOR_VISIBLE ) ) + if( ((BOARD*)m_Parent)->IsElementVisible( ANCHOR_VISIBLE ) ) { GRLine( &panel->m_ClipBox, DC, m_Pos.x - offset.x - anchor_size, m_Pos.y - offset.y, @@ -190,15 +190,22 @@ void MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC, pad->Draw( panel, DC, draw_mode, offset ); } + // Draws footprint anchor DrawAncre( panel, DC, offset, DIM_ANCRE_MODULE, draw_mode ); /* Draw graphic items */ - if( !(m_Reference->m_Flags & IS_MOVED) ) - m_Reference->Draw( panel, DC, draw_mode, offset ); + if( ((BOARD*)m_Parent)->IsElementVisible( MOD_REFERENCES_VISIBLE ) ) + { + if( !(m_Reference->m_Flags & IS_MOVED) ) + m_Reference->Draw( panel, DC, draw_mode, offset ); + } - if( !(m_Value->m_Flags & IS_MOVED) ) - m_Value->Draw( panel, DC, draw_mode, offset ); + if( ((BOARD*)m_Parent)->IsElementVisible( MOD_VALUES_VISIBLE ) ) + { + if( !(m_Value->m_Flags & IS_MOVED) ) + m_Value->Draw( panel, DC, draw_mode, offset ); + } for( BOARD_ITEM* item = m_Drawings; item; item = item->Next() ) { diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 48ddb15b5a..c3dc453a2d 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -106,7 +106,7 @@ PCB_LAYER_WIDGET::PCB_LAYER_WIDGET( WinEDA_PcbFrame* aParent, wxWindow* aFocusOw // is changed before appending to the LAYER_WIDGET. This is an automatic variable // not a static variable, change the color & state after copying from code to renderRows // on the stack. - LAYER_WIDGET::ROW renderRows[14] = { + LAYER_WIDGET::ROW renderRows[16] = { #define RR LAYER_WIDGET::ROW // Render Row abreviation to reduce source width @@ -128,6 +128,8 @@ PCB_LAYER_WIDGET::PCB_LAYER_WIDGET( WinEDA_PcbFrame* aParent, wxWindow* aFocusOw RR( _( "No-Connects" ), NO_CONNECTS_VISIBLE, -1, _( "Show a marker on pads which have no net connected" ) ), RR( _( "Modules Front" ), MOD_FR_VISIBLE, -1, _( "Show footprints that are on board's front") ), RR( _( "Modules Back" ), MOD_BK_VISIBLE, -1, _( "Show footprints that are on board's back") ), + RR( _( "Values" ), MOD_VALUES_VISIBLE, -1, _( "Show footprints values") ), + RR( _( "References" ), MOD_REFERENCES_VISIBLE, -1, _( "Show footprints references") ), }; for( unsigned row=0; rowGetScreen(); - frame = (WinEDA_BasePcbFrame*) panel->GetParent(); - - tmp = frame->m_DisplayPadFill; - frame->m_DisplayPadFill = FALSE; - - /* Draw pads. */ - for( D_PAD* pad = Module->m_Pads; pad; pad = pad->Next() ) - { - if( (pad->m_Masque_Layer & MasqueLayer) == 0 ) - continue; - - pad->Draw( panel, DC, draw_mode, wxPoint( ox, oy ) ); - } - - frame->m_DisplayPadFill = tmp; -} diff --git a/pcbnew/tracepcb.cpp b/pcbnew/tracepcb.cpp index ebf169a2f6..24e43d7a99 100644 --- a/pcbnew/tracepcb.cpp +++ b/pcbnew/tracepcb.cpp @@ -18,6 +18,15 @@ #include "pcbplot.h" #include "protos.h" +// Local functions: +/* Trace the pads of a module in sketch mode. + * Used to display pads when when the module visibility is set to not visible + * and we want to see pad through. + * The pads must appear on the layers selected in MasqueLayer + */ +static void Trace_Pads_Only( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module, + int ox, int oy, int MasqueLayer, int draw_mode ); + /* Draw the footprint editor BOARD, and others elements : axis, grid .. */ @@ -235,3 +244,35 @@ void BOARD::DrawHighLight( WinEDA_DrawPanel* aDrawPanel, wxDC* DC, int aNetCode } } } + + +/* Trace the pads of a module in sketch mode. + * Used to display pads when when the module visibility is set to not visible + * and we want to see pad through. + * The pads must appear on the layers selected in MasqueLayer + */ +void Trace_Pads_Only( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* Module, + int ox, int oy, int MasqueLayer, int draw_mode ) +{ + int tmp; + PCB_SCREEN* screen; + WinEDA_BasePcbFrame* frame; + + screen = (PCB_SCREEN*) panel->GetScreen(); + frame = (WinEDA_BasePcbFrame*) panel->GetParent(); + + tmp = frame->m_DisplayPadFill; + frame->m_DisplayPadFill = FALSE; + + /* Draw pads. */ + for( D_PAD* pad = Module->m_Pads; pad; pad = pad->Next() ) + { + if( (pad->m_Masque_Layer & MasqueLayer) == 0 ) + continue; + + pad->Draw( panel, DC, draw_mode, wxPoint( ox, oy ) ); + } + + frame->m_DisplayPadFill = tmp; +} +