Commit b256efc5 authored by charras's avatar charras

minor bugs fixed

parent bfb84e25
......@@ -25,7 +25,7 @@ const wxString RetroFileExtension( wxT( "stf" ) );
const wxString FootprintAliasFileExtension( wxT( "equ" ) );
// Wildcard for schematic retroannotation (import footprint names in schematic):
const wxString RetroFileWildcard( _( "Kicad component list files " \
const wxString RetroFileWildcard( _( "Kicad retroannotation files " \
"(*.stf)|*.stf" ) );
const wxString FootprintAliasFileWildcard( _( "Kicad footprint alias files " \
"(*.equ)|*.equ" ) );
......
......@@ -195,7 +195,7 @@ void WinEDA_LibeditFrame::PlacePin( wxDC* DC )
continue;
if( Pin->m_Flags )
continue;
if( ask_for_pin )
if( ask_for_pin && !g_EditPinByPinIsOn )
{
DrawPanel->m_IgnoreMouseEvents = true;
status = IsOK( this, _( "Occupied by other pin. Continue?" ) );
......
......@@ -214,7 +214,7 @@ void WinEDA_LibeditFrame::ReCreateHToolbar()
m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_LIBEDIT_EDIT_PIN_BY_PIN, wxEmptyString,
wxBitmap( pin2pin_xpm ),
_( "Edit pins part per part (Carefully use!)" ) );
_( "Edit pins part per part (Carefully use!)" ), wxITEM_CHECK );
m_HToolBar->ToggleTool( ID_LIBEDIT_EDIT_PIN_BY_PIN, g_EditPinByPinIsOn );
// after adding the buttons to the toolbar, must call Realize() to reflect the changes
......
......@@ -242,7 +242,7 @@ public:
// Pads sur modules
void AddPad( MODULE* Module, bool draw );
void DeletePad( D_PAD* Pad, wxDC* DC );
void DeletePad( D_PAD* Pad );
void StartMovePad( D_PAD* Pad, wxDC* DC );
void RotatePad( D_PAD* Pad, wxDC* DC );
void PlacePad( D_PAD* Pad, wxDC* DC );
......@@ -322,7 +322,7 @@ public:
* Defined separately in pcbnew and gerbview
*
* @param DC A device context to draw on.
*/
*/
void Block_Delete( wxDC* DC );
void Block_Rotate( wxDC* DC );
void Block_Invert( wxDC* DC );
......@@ -344,7 +344,7 @@ public:
void Block_Mirror_X( wxDC* DC );
/**
* Function Block_Duplicate
* copies-and-moves all tracks and segments within the selected block.
* copies-and-moves all tracks and segments within the selected block.
* New location is determined by the current offset from the selected block's original location.
* Defined separately in pcbnew and gerbview
*
......
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-05-16 07:41+0100\n"
"PO-Revision-Date: 2009-05-16 07:57+0100\n"
"POT-Creation-Date: 2009-05-16 20:42+0100\n"
"PO-Revision-Date: 2009-05-16 20:51+0100\n"
"Last-Translator: \n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"MIME-Version: 1.0\n"
......@@ -5628,20 +5628,19 @@ msgstr "Chemins de recherche défini par l'utilisateur"
#: pcbnew/dialog_pcbnew_config_libs_and_paths_fbp.cpp:74
msgid "Additional paths used in this project. The priority is highter than default Kicad paths."
msgstr ""
msgstr "Chemins additionnels utilisés dans ce projet. La priorité est plus haute que les chemins par défaut de Kicad."
#: pcbnew/dialog_pcbnew_config_libs_and_paths_fbp.cpp:97
#, fuzzy
msgid "Current search path list"
msgstr ""
"Liste des Hotkeys courantes:\n"
"\n"
msgstr "Liste des chemins de recherche courrants"
#: pcbnew/dialog_pcbnew_config_libs_and_paths_fbp.cpp:105
msgid ""
"Paths (system paths and user paths) used to search and load libraries files and component doc files.\n"
"Sorted by decreasing priority order."
msgstr ""
"Chemins (chemins système et chemins utilisateurs) utilisés pour chercher et charger les fichiers libriries et documentation des composants.\n"
"Triés par ordre de priorité décroissante."
#: eeschema/lib_export.cpp:47
msgid "Import Component"
......@@ -6457,7 +6456,7 @@ msgstr "Noir"
msgid "Background Color:"
msgstr "Couleur du Fond:"
#: eeschema/dialog_eeschema_config.cpp:247
#: eeschema/dialog_eeschema_config.cpp:224
msgid "Library files:"
msgstr "Fichiers Librairies:"
......@@ -8530,15 +8529,10 @@ msgid "New FootprintFilter:"
msgstr "Nouveau Filtre de Modules:"
#: eeschema/dialog_eeschema_config_fbp.cpp:20
msgid "Default netlist format"
msgstr "Format netlistes par défaut"
#: eeschema/dialog_eeschema_config_fbp.cpp:31
#, fuzzy
msgid "Component library files"
msgstr "Couche composant"
msgstr "Fichiers librairies de composants"
#: eeschema/dialog_eeschema_config_fbp.cpp:34
#: eeschema/dialog_eeschema_config_fbp.cpp:23
msgid ""
"List of active library files.\n"
"Only library files in this list are loaded by Eeschema.\n"
......@@ -8549,7 +8543,7 @@ msgstr ""
"Seuls les fichiers librairie dans cette liste sont chargés par eeschema.\n"
"L'ordre de cette liste est important:Eeschema cherche un composant donné en utilisant cette liste par ordre de priorité."
#: eeschema/dialog_eeschema_config_fbp.cpp:62
#: eeschema/dialog_eeschema_config_fbp.cpp:51
msgid "User defined search path"
msgstr "Chemin de recherche défini par l'utilisateur"
......@@ -9162,7 +9156,7 @@ msgstr "Impossible de créer le fichier netliste "
#: cvpcb/listlib.cpp:56
msgid "No PCB foot print libraries are listed in the current project file."
msgstr ""
msgstr "Aucune librairie de modules PCB listée dans le fichier projet courant."
#: cvpcb/listlib.cpp:57
msgid "Project File Error"
......@@ -9183,12 +9177,12 @@ msgstr "Ne peut ouvrir le fichier librairie de modules PCB <%s>."
#: cvpcb/listlib.cpp:95
#, c-format
msgid "<%s> is not a valid Kicad PCB foot print library"
msgstr ""
msgstr "<%s> n'est pas un fichier librairie module Kicad PCB valide."
#: cvpcb/listlib.cpp:127
#, c-format
msgid "Unexpected end of file occurred while parsing PCB foot print library <%s>."
msgstr ""
msgstr "Fin de fichier inattendue lors de l'analyse de la librairie de modules PCB <%s>."
#: cvpcb/listlib.cpp:162
#, c-format
......@@ -9198,12 +9192,12 @@ msgstr ""
#: cvpcb/listlib.cpp:171
#, c-format
msgid "<%s> is not a valid PCB foot print library document file."
msgstr ""
msgstr "<%s> n'est pas un fichier librairie documentation module PCB valide."
#: cvpcb/loadcmp.cpp:74
#, c-format
msgid "<%s> is not a valid Kicad PCB foot print library."
msgstr ""
msgstr "<%s> in'est pas un fichier de module PCB Kicad valide."
#: cvpcb/loadcmp.cpp:137
#, c-format
......@@ -9224,8 +9218,8 @@ msgid "Component %s %s pin %s : Different Nets"
msgstr "Composant %s %s pin %s : Nets Differents"
#: cvpcb/cvpcb.cpp:28
msgid "Kicad component list files (*.stf)|*.stf"
msgstr ""
msgid "Kicad retroannotation files (*.stf)|*.stf"
msgstr "Fichiers de retroannotaion Kicad (*.stf)|*.stf"
#: cvpcb/cvpcb.cpp:30
msgid "Kicad footprint alias files (*.equ)|*.equ"
......@@ -9255,9 +9249,9 @@ msgid "%d footprint aliases found."
msgstr "%d alias de modules trouvés."
#: cvpcb/autosel.cpp:169
#, fuzzy, c-format
#, c-format
msgid "Component %s: footprint %s not found in any of the project footprint libraries."
msgstr "Composant %s: Module %s non trouvé en librairies"
msgstr "Composant %s: Module %s non trouvé dans les librairies de modules du projet"
#: cvpcb/autosel.cpp:173
msgid "CVPcb Error"
......@@ -9443,9 +9437,8 @@ msgid "Netlist error: %s"
msgstr "Erreur Netliste: %s"
#: cvpcb/savecmp.cpp:24
#, fuzzy
msgid "Component Library Error"
msgstr "Couche composant"
msgstr "Erreur en Librairie de Composanr"
#: cvpcb/savecmp.cpp:87
#, c-format
......@@ -9455,7 +9448,7 @@ msgstr "Ne peut pas ouvrir le fichier librairie <%s>."
#: cvpcb/savecmp.cpp:96
#, c-format
msgid " <%s> does not appear to be a valid Kicad component library."
msgstr ""
msgstr " <%s>ne semble pas être une librairie de composants de Kicad valide."
#: cvpcb/savecmp.cpp:105
#, c-format
......@@ -11419,6 +11412,8 @@ msgstr "DCodes id."
msgid "Page Settings"
msgstr "Ajustage opt Page"
#~ msgid "Default netlist format"
#~ msgstr "Format netlistes par défaut"
#~ msgid "Loading schematic component libraries"
#~ msgstr "Chargement des librairies de composants schématiques"
......@@ -280,7 +280,7 @@ SEARCH_RESULT TRACK::Visit( INSPECTOR* inspector, const void* testData,
{
KICAD_T stype = *scanTypes;
#if 0 && defined (DEBUG)
#if 0 && defined(DEBUG)
std::cout << GetClass().mb_str() << ' ';
#endif
......@@ -363,9 +363,7 @@ void SEGVIA::SetLayerPair( int top_layer, int bottom_layer )
* @param bottom_layer = last layer connected by the via
*/
{
int via_type = Shape();
if( via_type == VIA_THROUGH )
if( Shape() == VIA_THROUGH )
{
top_layer = LAYER_CMP_N;
bottom_layer = COPPER_LAYER_N;
......@@ -390,11 +388,16 @@ void SEGVIA::ReturnLayerPair( int* top_layer, int* bottom_layer ) const
* @param bottom_layer = pointer to the last layer (can be null)
*/
{
int b_layer = (m_Layer >> 4) & 15;
int t_layer = m_Layer & 15;
int b_layer = COPPER_LAYER_N;
int t_layer = LAYER_CMP_N;
if( b_layer > t_layer )
EXCHG( b_layer, t_layer );
if( Shape() != VIA_THROUGH )
{
b_layer = (m_Layer >> 4) & 15;
t_layer = m_Layer & 15;
if( b_layer > t_layer )
EXCHG( b_layer, t_layer );
}
if( top_layer )
*top_layer = t_layer;
......@@ -516,11 +519,11 @@ bool TRACK::Save( FILE* aFile ) const
return true;
fprintf( aFile, "Po %d %d %d %d %d %d %d\n", m_Shape,
m_Start.x, m_Start.y, m_End.x, m_End.y, m_Width, m_Drill );
m_Start.x, m_Start.y, m_End.x, m_End.y, m_Width, m_Drill );
fprintf( aFile, "De %d %d %d %lX %X\n",
m_Layer, type, GetNet(),
m_TimeStamp, ReturnStatus() );
m_Layer, type, GetNet(),
m_TimeStamp, ReturnStatus() );
return true;
}
......@@ -582,7 +585,7 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
if( m_Shape == S_CIRCLE )
{
rayon = (int) hypot( (double) ( m_End.x - m_Start.x ),
(double) ( m_End.y - m_Start.y ) );
(double) ( m_End.y - m_Start.y ) );
if( panel->GetScreen()->Scale( l_piste ) < L_MIN_DESSIN )
{
GRCircle( &panel->m_ClipBox, DC, m_Start.x, m_Start.y, rayon, color );
......@@ -601,7 +604,7 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
else
{
GRCircle( &panel->m_ClipBox, DC, m_Start.x, m_Start.y, rayon,
m_Width, color );
m_Width, color );
}
}
return;
......@@ -610,19 +613,19 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
if( panel->GetScreen()->Scale( l_piste ) < L_MIN_DESSIN )
{
GRLine( &panel->m_ClipBox, DC, m_Start.x, m_Start.y,
m_End.x, m_End.y, 0, color );
m_End.x, m_End.y, 0, color );
return;
}
if( !DisplayOpt.DisplayPcbTrackFill || GetState( FORCE_SKETCH ) )
{
GRCSegm( &panel->m_ClipBox, DC, m_Start.x, m_Start.y,
m_End.x, m_End.y, m_Width, color );
m_End.x, m_End.y, m_Width, color );
}
else
{
GRFillCSegm( &panel->m_ClipBox, DC, m_Start.x, m_Start.y,
m_End.x, m_End.y, m_Width, color );
m_End.x, m_End.y, m_Width, color );
}
if( panel->GetScreen()->m_IsPrinting )
......@@ -645,7 +648,7 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
if( Type() == TYPE_ZONE )
return;
if ( DisplayOpt.DisplayNetNamesMode == 0 || DisplayOpt.DisplayNetNamesMode == 1 )
if( DisplayOpt.DisplayNetNamesMode == 0 || DisplayOpt.DisplayNetNamesMode == 1 )
return;
#define THRESHOLD 10
......@@ -670,21 +673,21 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
if( textlen > 0 )
{
// calculate a good size for the text
int tsize = MIN( m_Width, len / textlen );
wxPoint tpos = m_Start + m_End;
int tsize = MIN( m_Width, len / textlen );
wxPoint tpos = m_Start + m_End;
tpos.x /= 2;
tpos.y /= 2;
// Calculate angle: if the track segment is vertical, angle = 90 degrees
int angle = 0;
if ( (m_End.x - m_Start.x) == 0 ) // Vertical segment
angle = 900; // angle is in 0.1 degree
if( (m_End.x - m_Start.x) == 0 ) // Vertical segment
angle = 900; // angle is in 0.1 degree
if( panel->GetScreen()->Scale( tsize ) >= 6 )
{
tsize = (tsize * 8) / 10; // small reduction to give a better look
DrawGraphicText( panel, DC, tpos,
WHITE, net->GetShortNetname(), angle, wxSize( tsize, tsize ),
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, tsize / 7 );
WHITE, net->GetShortNetname(), angle, wxSize( tsize, tsize ),
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, tsize / 7 );
}
}
}
......@@ -752,14 +755,14 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
if( drill_rayon < inner_rayon ) // We can show the via hole
{
GRCircle( &panel->m_ClipBox, DC, m_Start.x, m_Start.y,
drill_rayon, color );
drill_rayon, color );
}
}
}
if( DisplayOpt.DisplayTrackIsol )
GRCircle( &panel->m_ClipBox, DC, m_Start.x, m_Start.y,
rayon + g_DesignSettings.m_TrackClearence, color );
rayon + g_DesignSettings.m_TrackClearence, color );
// for Micro Vias, draw a partial cross :
// X on component layer, or + on copper layer
......@@ -781,15 +784,15 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
/* lines | or \ */
GRLine( &panel->m_ClipBox, DC, m_Start.x - ax, m_Start.y - ay,
m_Start.x - bx, m_Start.y - by, 0, color );
m_Start.x - bx, m_Start.y - by, 0, color );
GRLine( &panel->m_ClipBox, DC, m_Start.x + bx, m_Start.y + by,
m_Start.x + ax, m_Start.y + ay, 0, color );
m_Start.x + ax, m_Start.y + ay, 0, color );
/* lines - or / */
GRLine( &panel->m_ClipBox, DC, m_Start.x + ay, m_Start.y - ax,
m_Start.x + by, m_Start.y - bx, 0, color );
m_Start.x + by, m_Start.y - bx, 0, color );
GRLine( &panel->m_ClipBox, DC, m_Start.x - by, m_Start.y + bx,
m_Start.x - ay, m_Start.y + ax, 0, color );
m_Start.x - ay, m_Start.y + ax, 0, color );
}
// for Buried Vias, draw a partial line :
......@@ -806,20 +809,20 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
RotatePoint( &ax, &ay, layer_top * 3600 / g_DesignSettings.m_CopperLayerCount );
RotatePoint( &bx, &by, layer_top * 3600 / g_DesignSettings.m_CopperLayerCount );
GRLine( &panel->m_ClipBox, DC, m_Start.x - ax, m_Start.y - ay,
m_Start.x - bx, m_Start.y - by, 0, color );
m_Start.x - bx, m_Start.y - by, 0, color );
/* lines for the bottom layer */
ax = 0; ay = rayon; bx = 0; by = drill_rayon;
RotatePoint( &ax, &ay, layer_bottom * 3600 / g_DesignSettings.m_CopperLayerCount );
RotatePoint( &bx, &by, layer_bottom * 3600 / g_DesignSettings.m_CopperLayerCount );
GRLine( &panel->m_ClipBox, DC, m_Start.x - ax, m_Start.y - ay,
m_Start.x - bx, m_Start.y - by, 0, color );
m_Start.x - bx, m_Start.y - by, 0, color );
}
// Display the short netname:
if( GetNet() == 0 )
return;
if ( DisplayOpt.DisplayNetNamesMode == 0 || DisplayOpt.DisplayNetNamesMode == 1 )
if( DisplayOpt.DisplayNetNamesMode == 0 || DisplayOpt.DisplayNetNamesMode == 1 )
return;
EQUIPOT* net = ( (BOARD*) GetParent() )->FindNet( GetNet() );
if( net == NULL )
......@@ -834,8 +837,8 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
{
tsize = (tsize * 8) / 10; // small reduction to give a better look, inside via
DrawGraphicText( panel, DC, m_Start,
WHITE, net->GetShortNetname(), 0, wxSize( tsize, tsize ),
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, tsize / 7 );
WHITE, net->GetShortNetname(), 0, wxSize( tsize, tsize ),
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, tsize / 7 );
}
}
}
......@@ -950,19 +953,24 @@ void TRACK::DisplayInfo( WinEDA_DrawFrame* frame )
if( Type() == TYPE_VIA ) // Display Diam and Drill values
{
// Display diameter value:
Affiche_1_Parametre( frame, text_pos, _( "Diam" ), msg, DARKCYAN );
text_pos += 8;
// Display drill value
int drill_value = GetDrillValue();
valeur_param( (unsigned) drill_value, msg );
wxString title = _( "Drill" );
title += wxT(" ");
if( g_DesignSettings.m_ViaDrill >= 0 )
title += wxT( "*" );
if( m_Drill >= 0 )
title += _( "(Specific)" );
else
title += _( "(Default)" );
Affiche_1_Parametre( frame, text_pos, _( "Drill" ), msg, RED );
Affiche_1_Parametre( frame, text_pos, title, msg, RED );
}
else
Affiche_1_Parametre( frame, text_pos, _( "Width" ), msg, DARKCYAN );
......@@ -1019,7 +1027,7 @@ bool TRACK::HitTest( EDA_Rect& refArea )
}
#if defined (DEBUG)
#if defined(DEBUG)
/**
* Function Show
......
......@@ -734,7 +734,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
break;
case ID_POPUP_PCB_DELETE_PAD:
DeletePad( (D_PAD*) GetCurItem(), &dc );
DeletePad( (D_PAD*) GetCurItem() );
SetCurItem( NULL );
DrawPanel->MouseToCursorSchema();
break;
......
......@@ -136,7 +136,7 @@ void WinEDA_ModuleEditFrame::RemoveStruct( EDA_BaseStruct* Item, wxDC* DC )
switch( Item->Type() )
{
case TYPE_PAD:
DeletePad( (D_PAD*) Item, DC );
DeletePad( (D_PAD*) Item );
break;
case TYPE_TEXTE_MODULE:
......
......@@ -160,6 +160,13 @@ int WinEDA_BasePcbFrame::ReadListeSegmentDescr( FILE* File,
newTrack->SetDrillValue(drill);
newTrack->SetLayer( layer );
if ( makeType == TYPE_VIA )
{ // Ensure layers are OK when possible:
if( newTrack->Shape() == VIA_THROUGH )
((SEGVIA*)newTrack)->SetLayerPair( LAYER_CMP_N, COPPER_LAYER_N );
}
newTrack->SetNet( net_code );
newTrack->SetState( flags, ON );
}
......
......@@ -163,7 +163,8 @@ MODULE* WinEDA_BasePcbFrame::Load_Module_From_Library( const wxString& library,
GetBoard()->m_Status_Pcb = 0;
module->SetPosition( curspos );
build_liste_pads();
module->Draw( DrawPanel, DC, GR_OR );
if ( DC )
module->Draw( DrawPanel, DC, GR_OR );
}
return module;
......
......@@ -131,6 +131,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
{
int id = event.GetId();
wxPoint pos;
bool redraw = false;
wxClientDC dc( DrawPanel );
DrawPanel->CursorOff( &dc );
......@@ -358,7 +359,8 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
SetCurItem( NULL );
Clear_Pcb( true );
GetScreen()->m_Curseur = wxPoint( 0, 0 );
Load_Module_From_Library( full_libraryfilename, &dc );
Load_Module_From_Library( full_libraryfilename, NULL );
redraw = true;
}
if( GetBoard()->m_Modules )
GetBoard()->m_Modules->m_Flags = 0;
......@@ -440,7 +442,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_PCB_ROTATE_MODULE_COUNTERCLOCKWISE:
DrawPanel->MouseToCursorSchema();
Rotate_Module( &dc, (MODULE*) GetScreen()->GetCurItem(), 900, true );
Rotate_Module( NULL, (MODULE*) GetScreen()->GetCurItem(), 900, true );
break;
case ID_POPUP_PCB_ROTATE_MODULE_CLOCKWISE:
......@@ -468,7 +470,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_PCB_DELETE_PAD:
SaveCopyInUndoList( GetBoard()->m_Modules );
DeletePad( (D_PAD*) GetScreen()->GetCurItem(), &dc );
DeletePad( (D_PAD*) GetScreen()->GetCurItem() );
SetCurItem( NULL );
DrawPanel->MouseToCursorSchema();
break;
......@@ -658,6 +660,8 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
SetToolbars();
DrawPanel->CursorOn( &dc );
if ( redraw )
DrawPanel->Refresh();
}
......
......@@ -243,7 +243,7 @@ void WinEDA_BasePcbFrame::AddPad( MODULE* Module, bool draw )
/*********************************************************/
void WinEDA_BasePcbFrame::DeletePad( D_PAD* Pad, wxDC* DC )
void WinEDA_BasePcbFrame::DeletePad( D_PAD* Pad )
/*********************************************************/
/* Function to delete the pad "pad" */
{
......@@ -336,7 +336,8 @@ void WinEDA_BasePcbFrame::PlacePad( D_PAD* Pad, wxDC* DC )
Pad->m_Flags = 0;
Pad->Draw( DrawPanel, DC, GR_OR );
if ( DC )
Pad->Draw( DrawPanel, DC, GR_OR );
Module->Set_Rectangle_Encadrement();
Module->m_LastEdit_Time = time( NULL );
......@@ -347,7 +348,8 @@ void WinEDA_BasePcbFrame::PlacePad( D_PAD* Pad, wxDC* DC )
{
Track = pt_drag->m_Segm;
Track->SetState( EDIT, OFF );
Track->Draw( DrawPanel, DC, GR_OR );
if ( DC )
Track->Draw( DrawPanel, DC, GR_OR );
}
EraseDragListe();
......@@ -377,7 +379,8 @@ void WinEDA_BasePcbFrame::RotatePad( D_PAD* Pad, wxDC* DC )
GetScreen()->SetModify();
Module->Draw( DrawPanel, DC, GR_XOR );
if ( DC )
Module->Draw( DrawPanel, DC, GR_XOR );
EXCHG( Pad->m_Size.x, Pad->m_Size.y );
EXCHG( Pad->m_Drill.x, Pad->m_Drill.y );
......@@ -391,5 +394,6 @@ void WinEDA_BasePcbFrame::RotatePad( D_PAD* Pad, wxDC* DC )
Module->Set_Rectangle_Encadrement();
Pad->DisplayInfo( this );
Module->Draw( DrawPanel, DC, GR_OR );
if ( DC )
Module->Draw( DrawPanel, DC, GR_OR );
}
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