Commit b256efc5 authored by charras's avatar charras

minor bugs fixed

parent bfb84e25
...@@ -25,7 +25,7 @@ const wxString RetroFileExtension( wxT( "stf" ) ); ...@@ -25,7 +25,7 @@ const wxString RetroFileExtension( wxT( "stf" ) );
const wxString FootprintAliasFileExtension( wxT( "equ" ) ); const wxString FootprintAliasFileExtension( wxT( "equ" ) );
// Wildcard for schematic retroannotation (import footprint names in schematic): // Wildcard for schematic retroannotation (import footprint names in schematic):
const wxString RetroFileWildcard( _( "Kicad component list files " \ const wxString RetroFileWildcard( _( "Kicad retroannotation files " \
"(*.stf)|*.stf" ) ); "(*.stf)|*.stf" ) );
const wxString FootprintAliasFileWildcard( _( "Kicad footprint alias files " \ const wxString FootprintAliasFileWildcard( _( "Kicad footprint alias files " \
"(*.equ)|*.equ" ) ); "(*.equ)|*.equ" ) );
......
...@@ -195,7 +195,7 @@ void WinEDA_LibeditFrame::PlacePin( wxDC* DC ) ...@@ -195,7 +195,7 @@ void WinEDA_LibeditFrame::PlacePin( wxDC* DC )
continue; continue;
if( Pin->m_Flags ) if( Pin->m_Flags )
continue; continue;
if( ask_for_pin ) if( ask_for_pin && !g_EditPinByPinIsOn )
{ {
DrawPanel->m_IgnoreMouseEvents = true; DrawPanel->m_IgnoreMouseEvents = true;
status = IsOK( this, _( "Occupied by other pin. Continue?" ) ); status = IsOK( this, _( "Occupied by other pin. Continue?" ) );
......
...@@ -214,7 +214,7 @@ void WinEDA_LibeditFrame::ReCreateHToolbar() ...@@ -214,7 +214,7 @@ void WinEDA_LibeditFrame::ReCreateHToolbar()
m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_LIBEDIT_EDIT_PIN_BY_PIN, wxEmptyString, m_HToolBar->AddTool( ID_LIBEDIT_EDIT_PIN_BY_PIN, wxEmptyString,
wxBitmap( pin2pin_xpm ), 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 ); 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 // after adding the buttons to the toolbar, must call Realize() to reflect the changes
......
...@@ -242,7 +242,7 @@ public: ...@@ -242,7 +242,7 @@ public:
// Pads sur modules // Pads sur modules
void AddPad( MODULE* Module, bool draw ); 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 StartMovePad( D_PAD* Pad, wxDC* DC );
void RotatePad( D_PAD* Pad, wxDC* DC ); void RotatePad( D_PAD* Pad, wxDC* DC );
void PlacePad( D_PAD* Pad, wxDC* DC ); void PlacePad( D_PAD* Pad, wxDC* DC );
......
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-05-16 07:41+0100\n" "POT-Creation-Date: 2009-05-16 20:42+0100\n"
"PO-Revision-Date: 2009-05-16 07:57+0100\n" "PO-Revision-Date: 2009-05-16 20:51+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"
...@@ -5628,20 +5628,19 @@ msgstr "Chemins de recherche défini par l'utilisateur" ...@@ -5628,20 +5628,19 @@ msgstr "Chemins de recherche défini par l'utilisateur"
#: pcbnew/dialog_pcbnew_config_libs_and_paths_fbp.cpp:74 #: 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." 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 #: pcbnew/dialog_pcbnew_config_libs_and_paths_fbp.cpp:97
#, fuzzy
msgid "Current search path list" msgid "Current search path list"
msgstr "" msgstr "Liste des chemins de recherche courrants"
"Liste des Hotkeys courantes:\n"
"\n"
#: pcbnew/dialog_pcbnew_config_libs_and_paths_fbp.cpp:105 #: pcbnew/dialog_pcbnew_config_libs_and_paths_fbp.cpp:105
msgid "" msgid ""
"Paths (system paths and user paths) used to search and load libraries files and component doc files.\n" "Paths (system paths and user paths) used to search and load libraries files and component doc files.\n"
"Sorted by decreasing priority order." "Sorted by decreasing priority order."
msgstr "" 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 #: eeschema/lib_export.cpp:47
msgid "Import Component" msgid "Import Component"
...@@ -6457,7 +6456,7 @@ msgstr "Noir" ...@@ -6457,7 +6456,7 @@ msgstr "Noir"
msgid "Background Color:" msgid "Background Color:"
msgstr "Couleur du Fond:" msgstr "Couleur du Fond:"
#: eeschema/dialog_eeschema_config.cpp:247 #: eeschema/dialog_eeschema_config.cpp:224
msgid "Library files:" msgid "Library files:"
msgstr "Fichiers Librairies:" msgstr "Fichiers Librairies:"
...@@ -8530,15 +8529,10 @@ msgid "New FootprintFilter:" ...@@ -8530,15 +8529,10 @@ msgid "New FootprintFilter:"
msgstr "Nouveau Filtre de Modules:" msgstr "Nouveau Filtre de Modules:"
#: eeschema/dialog_eeschema_config_fbp.cpp:20 #: 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" 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 "" msgid ""
"List of active library files.\n" "List of active library files.\n"
"Only library files in this list are loaded by Eeschema.\n" "Only library files in this list are loaded by Eeschema.\n"
...@@ -8549,7 +8543,7 @@ msgstr "" ...@@ -8549,7 +8543,7 @@ msgstr ""
"Seuls les fichiers librairie dans cette liste sont chargés par eeschema.\n" "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é." "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" msgid "User defined search path"
msgstr "Chemin de recherche défini par l'utilisateur" msgstr "Chemin de recherche défini par l'utilisateur"
...@@ -9162,7 +9156,7 @@ msgstr "Impossible de créer le fichier netliste " ...@@ -9162,7 +9156,7 @@ msgstr "Impossible de créer le fichier netliste "
#: cvpcb/listlib.cpp:56 #: cvpcb/listlib.cpp:56
msgid "No PCB foot print libraries are listed in the current project file." 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 #: cvpcb/listlib.cpp:57
msgid "Project File Error" msgid "Project File Error"
...@@ -9183,12 +9177,12 @@ msgstr "Ne peut ouvrir le fichier librairie de modules PCB <%s>." ...@@ -9183,12 +9177,12 @@ msgstr "Ne peut ouvrir le fichier librairie de modules PCB <%s>."
#: cvpcb/listlib.cpp:95 #: cvpcb/listlib.cpp:95
#, c-format #, c-format
msgid "<%s> is not a valid Kicad PCB foot print library" 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 #: cvpcb/listlib.cpp:127
#, c-format #, c-format
msgid "Unexpected end of file occurred while parsing PCB foot print library <%s>." 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 #: cvpcb/listlib.cpp:162
#, c-format #, c-format
...@@ -9198,12 +9192,12 @@ msgstr "" ...@@ -9198,12 +9192,12 @@ msgstr ""
#: cvpcb/listlib.cpp:171 #: cvpcb/listlib.cpp:171
#, c-format #, c-format
msgid "<%s> is not a valid PCB foot print library document file." 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 #: cvpcb/loadcmp.cpp:74
#, c-format #, c-format
msgid "<%s> is not a valid Kicad PCB foot print library." 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 #: cvpcb/loadcmp.cpp:137
#, c-format #, c-format
...@@ -9224,8 +9218,8 @@ msgid "Component %s %s pin %s : Different Nets" ...@@ -9224,8 +9218,8 @@ msgid "Component %s %s pin %s : Different Nets"
msgstr "Composant %s %s pin %s : Nets Differents" msgstr "Composant %s %s pin %s : Nets Differents"
#: cvpcb/cvpcb.cpp:28 #: cvpcb/cvpcb.cpp:28
msgid "Kicad component list files (*.stf)|*.stf" msgid "Kicad retroannotation files (*.stf)|*.stf"
msgstr "" msgstr "Fichiers de retroannotaion Kicad (*.stf)|*.stf"
#: cvpcb/cvpcb.cpp:30 #: cvpcb/cvpcb.cpp:30
msgid "Kicad footprint alias files (*.equ)|*.equ" msgid "Kicad footprint alias files (*.equ)|*.equ"
...@@ -9255,9 +9249,9 @@ msgid "%d footprint aliases found." ...@@ -9255,9 +9249,9 @@ msgid "%d footprint aliases found."
msgstr "%d alias de modules trouvés." msgstr "%d alias de modules trouvés."
#: cvpcb/autosel.cpp:169 #: cvpcb/autosel.cpp:169
#, fuzzy, c-format #, c-format
msgid "Component %s: footprint %s not found in any of the project footprint libraries." 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 #: cvpcb/autosel.cpp:173
msgid "CVPcb Error" msgid "CVPcb Error"
...@@ -9443,9 +9437,8 @@ msgid "Netlist error: %s" ...@@ -9443,9 +9437,8 @@ msgid "Netlist error: %s"
msgstr "Erreur Netliste: %s" msgstr "Erreur Netliste: %s"
#: cvpcb/savecmp.cpp:24 #: cvpcb/savecmp.cpp:24
#, fuzzy
msgid "Component Library Error" msgid "Component Library Error"
msgstr "Couche composant" msgstr "Erreur en Librairie de Composanr"
#: cvpcb/savecmp.cpp:87 #: cvpcb/savecmp.cpp:87
#, c-format #, c-format
...@@ -9455,7 +9448,7 @@ msgstr "Ne peut pas ouvrir le fichier librairie <%s>." ...@@ -9455,7 +9448,7 @@ msgstr "Ne peut pas ouvrir le fichier librairie <%s>."
#: cvpcb/savecmp.cpp:96 #: cvpcb/savecmp.cpp:96
#, c-format #, c-format
msgid " <%s> does not appear to be a valid Kicad component library." 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 #: cvpcb/savecmp.cpp:105
#, c-format #, c-format
...@@ -11419,6 +11412,8 @@ msgstr "DCodes id." ...@@ -11419,6 +11412,8 @@ msgstr "DCodes id."
msgid "Page Settings" msgid "Page Settings"
msgstr "Ajustage opt Page" msgstr "Ajustage opt Page"
#~ msgid "Default netlist format"
#~ msgstr "Format netlistes par défaut"
#~ msgid "Loading schematic component libraries" #~ msgid "Loading schematic component libraries"
#~ msgstr "Chargement des librairies de composants schématiques" #~ msgstr "Chargement des librairies de composants schématiques"
...@@ -280,7 +280,7 @@ SEARCH_RESULT TRACK::Visit( INSPECTOR* inspector, const void* testData, ...@@ -280,7 +280,7 @@ SEARCH_RESULT TRACK::Visit( INSPECTOR* inspector, const void* testData,
{ {
KICAD_T stype = *scanTypes; KICAD_T stype = *scanTypes;
#if 0 && defined (DEBUG) #if 0 && defined(DEBUG)
std::cout << GetClass().mb_str() << ' '; std::cout << GetClass().mb_str() << ' ';
#endif #endif
...@@ -363,9 +363,7 @@ void SEGVIA::SetLayerPair( int top_layer, int bottom_layer ) ...@@ -363,9 +363,7 @@ void SEGVIA::SetLayerPair( int top_layer, int bottom_layer )
* @param bottom_layer = last layer connected by the via * @param bottom_layer = last layer connected by the via
*/ */
{ {
int via_type = Shape(); if( Shape() == VIA_THROUGH )
if( via_type == VIA_THROUGH )
{ {
top_layer = LAYER_CMP_N; top_layer = LAYER_CMP_N;
bottom_layer = COPPER_LAYER_N; bottom_layer = COPPER_LAYER_N;
...@@ -390,11 +388,16 @@ void SEGVIA::ReturnLayerPair( int* top_layer, int* bottom_layer ) const ...@@ -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) * @param bottom_layer = pointer to the last layer (can be null)
*/ */
{ {
int b_layer = (m_Layer >> 4) & 15; int b_layer = COPPER_LAYER_N;
int t_layer = m_Layer & 15; int t_layer = LAYER_CMP_N;
if( Shape() != VIA_THROUGH )
{
b_layer = (m_Layer >> 4) & 15;
t_layer = m_Layer & 15;
if( b_layer > t_layer ) if( b_layer > t_layer )
EXCHG( b_layer, t_layer ); EXCHG( b_layer, t_layer );
}
if( top_layer ) if( top_layer )
*top_layer = t_layer; *top_layer = t_layer;
...@@ -645,7 +648,7 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin ...@@ -645,7 +648,7 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
if( Type() == TYPE_ZONE ) if( Type() == TYPE_ZONE )
return; return;
if ( DisplayOpt.DisplayNetNamesMode == 0 || DisplayOpt.DisplayNetNamesMode == 1 ) if( DisplayOpt.DisplayNetNamesMode == 0 || DisplayOpt.DisplayNetNamesMode == 1 )
return; return;
#define THRESHOLD 10 #define THRESHOLD 10
...@@ -677,7 +680,7 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin ...@@ -677,7 +680,7 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
// Calculate angle: if the track segment is vertical, angle = 90 degrees // Calculate angle: if the track segment is vertical, angle = 90 degrees
int angle = 0; int angle = 0;
if ( (m_End.x - m_Start.x) == 0 ) // Vertical segment if( (m_End.x - m_Start.x) == 0 ) // Vertical segment
angle = 900; // angle is in 0.1 degree angle = 900; // angle is in 0.1 degree
if( panel->GetScreen()->Scale( tsize ) >= 6 ) if( panel->GetScreen()->Scale( tsize ) >= 6 )
{ {
...@@ -819,7 +822,7 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi ...@@ -819,7 +822,7 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
// Display the short netname: // Display the short netname:
if( GetNet() == 0 ) if( GetNet() == 0 )
return; return;
if ( DisplayOpt.DisplayNetNamesMode == 0 || DisplayOpt.DisplayNetNamesMode == 1 ) if( DisplayOpt.DisplayNetNamesMode == 0 || DisplayOpt.DisplayNetNamesMode == 1 )
return; return;
EQUIPOT* net = ( (BOARD*) GetParent() )->FindNet( GetNet() ); EQUIPOT* net = ( (BOARD*) GetParent() )->FindNet( GetNet() );
if( net == NULL ) if( net == NULL )
...@@ -950,19 +953,24 @@ void TRACK::DisplayInfo( WinEDA_DrawFrame* frame ) ...@@ -950,19 +953,24 @@ void TRACK::DisplayInfo( WinEDA_DrawFrame* frame )
if( Type() == TYPE_VIA ) // Display Diam and Drill values if( Type() == TYPE_VIA ) // Display Diam and Drill values
{ {
// Display diameter value:
Affiche_1_Parametre( frame, text_pos, _( "Diam" ), msg, DARKCYAN ); Affiche_1_Parametre( frame, text_pos, _( "Diam" ), msg, DARKCYAN );
text_pos += 8; text_pos += 8;
// Display drill value
int drill_value = GetDrillValue(); int drill_value = GetDrillValue();
valeur_param( (unsigned) drill_value, msg ); valeur_param( (unsigned) drill_value, msg );
wxString title = _( "Drill" ); wxString title = _( "Drill" );
title += wxT(" ");
if( g_DesignSettings.m_ViaDrill >= 0 ) if( m_Drill >= 0 )
title += wxT( "*" ); title += _( "(Specific)" );
else
title += _( "(Default)" );
Affiche_1_Parametre( frame, text_pos, _( "Drill" ), msg, RED ); Affiche_1_Parametre( frame, text_pos, title, msg, RED );
} }
else else
Affiche_1_Parametre( frame, text_pos, _( "Width" ), msg, DARKCYAN ); Affiche_1_Parametre( frame, text_pos, _( "Width" ), msg, DARKCYAN );
...@@ -1019,7 +1027,7 @@ bool TRACK::HitTest( EDA_Rect& refArea ) ...@@ -1019,7 +1027,7 @@ bool TRACK::HitTest( EDA_Rect& refArea )
} }
#if defined (DEBUG) #if defined(DEBUG)
/** /**
* Function Show * Function Show
......
...@@ -734,7 +734,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -734,7 +734,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
break; break;
case ID_POPUP_PCB_DELETE_PAD: case ID_POPUP_PCB_DELETE_PAD:
DeletePad( (D_PAD*) GetCurItem(), &dc ); DeletePad( (D_PAD*) GetCurItem() );
SetCurItem( NULL ); SetCurItem( NULL );
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
break; break;
......
...@@ -136,7 +136,7 @@ void WinEDA_ModuleEditFrame::RemoveStruct( EDA_BaseStruct* Item, wxDC* DC ) ...@@ -136,7 +136,7 @@ void WinEDA_ModuleEditFrame::RemoveStruct( EDA_BaseStruct* Item, wxDC* DC )
switch( Item->Type() ) switch( Item->Type() )
{ {
case TYPE_PAD: case TYPE_PAD:
DeletePad( (D_PAD*) Item, DC ); DeletePad( (D_PAD*) Item );
break; break;
case TYPE_TEXTE_MODULE: case TYPE_TEXTE_MODULE:
......
...@@ -160,6 +160,13 @@ int WinEDA_BasePcbFrame::ReadListeSegmentDescr( FILE* File, ...@@ -160,6 +160,13 @@ int WinEDA_BasePcbFrame::ReadListeSegmentDescr( FILE* File,
newTrack->SetDrillValue(drill); newTrack->SetDrillValue(drill);
newTrack->SetLayer( layer ); 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->SetNet( net_code );
newTrack->SetState( flags, ON ); newTrack->SetState( flags, ON );
} }
......
...@@ -163,6 +163,7 @@ MODULE* WinEDA_BasePcbFrame::Load_Module_From_Library( const wxString& library, ...@@ -163,6 +163,7 @@ MODULE* WinEDA_BasePcbFrame::Load_Module_From_Library( const wxString& library,
GetBoard()->m_Status_Pcb = 0; GetBoard()->m_Status_Pcb = 0;
module->SetPosition( curspos ); module->SetPosition( curspos );
build_liste_pads(); build_liste_pads();
if ( DC )
module->Draw( DrawPanel, DC, GR_OR ); module->Draw( DrawPanel, DC, GR_OR );
} }
......
...@@ -131,6 +131,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -131,6 +131,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
{ {
int id = event.GetId(); int id = event.GetId();
wxPoint pos; wxPoint pos;
bool redraw = false;
wxClientDC dc( DrawPanel ); wxClientDC dc( DrawPanel );
DrawPanel->CursorOff( &dc ); DrawPanel->CursorOff( &dc );
...@@ -358,7 +359,8 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -358,7 +359,8 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
SetCurItem( NULL ); SetCurItem( NULL );
Clear_Pcb( true ); Clear_Pcb( true );
GetScreen()->m_Curseur = wxPoint( 0, 0 ); 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 ) if( GetBoard()->m_Modules )
GetBoard()->m_Modules->m_Flags = 0; GetBoard()->m_Modules->m_Flags = 0;
...@@ -440,7 +442,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -440,7 +442,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_PCB_ROTATE_MODULE_COUNTERCLOCKWISE: case ID_POPUP_PCB_ROTATE_MODULE_COUNTERCLOCKWISE:
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
Rotate_Module( &dc, (MODULE*) GetScreen()->GetCurItem(), 900, true ); Rotate_Module( NULL, (MODULE*) GetScreen()->GetCurItem(), 900, true );
break; break;
case ID_POPUP_PCB_ROTATE_MODULE_CLOCKWISE: case ID_POPUP_PCB_ROTATE_MODULE_CLOCKWISE:
...@@ -468,7 +470,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -468,7 +470,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_PCB_DELETE_PAD: case ID_POPUP_PCB_DELETE_PAD:
SaveCopyInUndoList( GetBoard()->m_Modules ); SaveCopyInUndoList( GetBoard()->m_Modules );
DeletePad( (D_PAD*) GetScreen()->GetCurItem(), &dc ); DeletePad( (D_PAD*) GetScreen()->GetCurItem() );
SetCurItem( NULL ); SetCurItem( NULL );
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
break; break;
...@@ -658,6 +660,8 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -658,6 +660,8 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
SetToolbars(); SetToolbars();
DrawPanel->CursorOn( &dc ); DrawPanel->CursorOn( &dc );
if ( redraw )
DrawPanel->Refresh();
} }
......
...@@ -243,7 +243,7 @@ void WinEDA_BasePcbFrame::AddPad( MODULE* Module, bool draw ) ...@@ -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" */ /* Function to delete the pad "pad" */
{ {
...@@ -336,6 +336,7 @@ void WinEDA_BasePcbFrame::PlacePad( D_PAD* Pad, wxDC* DC ) ...@@ -336,6 +336,7 @@ void WinEDA_BasePcbFrame::PlacePad( D_PAD* Pad, wxDC* DC )
Pad->m_Flags = 0; Pad->m_Flags = 0;
if ( DC )
Pad->Draw( DrawPanel, DC, GR_OR ); Pad->Draw( DrawPanel, DC, GR_OR );
Module->Set_Rectangle_Encadrement(); Module->Set_Rectangle_Encadrement();
...@@ -347,6 +348,7 @@ void WinEDA_BasePcbFrame::PlacePad( D_PAD* Pad, wxDC* DC ) ...@@ -347,6 +348,7 @@ void WinEDA_BasePcbFrame::PlacePad( D_PAD* Pad, wxDC* DC )
{ {
Track = pt_drag->m_Segm; Track = pt_drag->m_Segm;
Track->SetState( EDIT, OFF ); Track->SetState( EDIT, OFF );
if ( DC )
Track->Draw( DrawPanel, DC, GR_OR ); Track->Draw( DrawPanel, DC, GR_OR );
} }
...@@ -377,6 +379,7 @@ void WinEDA_BasePcbFrame::RotatePad( D_PAD* Pad, wxDC* DC ) ...@@ -377,6 +379,7 @@ void WinEDA_BasePcbFrame::RotatePad( D_PAD* Pad, wxDC* DC )
GetScreen()->SetModify(); GetScreen()->SetModify();
if ( DC )
Module->Draw( DrawPanel, DC, GR_XOR ); Module->Draw( DrawPanel, DC, GR_XOR );
EXCHG( Pad->m_Size.x, Pad->m_Size.y ); EXCHG( Pad->m_Size.x, Pad->m_Size.y );
...@@ -391,5 +394,6 @@ void WinEDA_BasePcbFrame::RotatePad( D_PAD* Pad, wxDC* DC ) ...@@ -391,5 +394,6 @@ void WinEDA_BasePcbFrame::RotatePad( D_PAD* Pad, wxDC* DC )
Module->Set_Rectangle_Encadrement(); Module->Set_Rectangle_Encadrement();
Pad->DisplayInfo( this ); Pad->DisplayInfo( this );
if ( DC )
Module->Draw( DrawPanel, DC, GR_OR ); 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