Commit 4002c6f4 authored by CHARRAS's avatar CHARRAS

Solved an annotation problem, some code cleanning and translation

parent 08033923
......@@ -4,6 +4,12 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2007-Dec-02 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+eeschema:
Solved an annotation problem: in multiple parts per package components,
when sorted by position, parts were not grouped by package.
2007-Dec-2 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
......
This diff is collapsed.
......@@ -155,6 +155,8 @@ void WinEDA_AnnotateFrame::CreateControls()
itemBoxSizer7->Add(itemButton10, 0, wxGROW|wxALL, 5);
////@end WinEDA_AnnotateFrame content construction
m_AnnotSortCmpCtrl->SetSelection(SortByPosition ? 0 : 1);
}
/*!
......
......@@ -148,7 +148,7 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event )
break;
case ID_PCB_GLOBAL_DELETE:
Erase_Current_Layer( &dc, TRUE );
Erase_Current_Layer( TRUE );
break;
case wxID_CUT:
......
......@@ -32,7 +32,7 @@ void WinEDA_GerberFrame::Files_io( wxCommandEvent& event )
{
case ID_MENU_LOAD_FILE:
case ID_LOAD_FILE:
if( Clear_Pcb( &dc, TRUE ) )
if( Clear_Pcb( TRUE ) )
{
LoadOneGerberFile( wxEmptyString, &dc, 0 );
}
......@@ -56,7 +56,7 @@ void WinEDA_GerberFrame::Files_io( wxCommandEvent& event )
case ID_MENU_NEW_BOARD:
case ID_NEW_BOARD:
Clear_Pcb( &dc, TRUE );
Clear_Pcb( TRUE );
Zoom_Automatique( FALSE );
GetScreen()->SetRefreshReq();
break;
......@@ -71,7 +71,7 @@ void WinEDA_GerberFrame::Files_io( wxCommandEvent& event )
case ID_LOAD_FILE_8:
case ID_LOAD_FILE_9:
case ID_LOAD_FILE_10:
if( Clear_Pcb( &dc, TRUE ) )
if( Clear_Pcb( TRUE ) )
{
LoadOneGerberFile(
GetLastProject( id - ID_LOAD_FILE_1 ).GetData(),
......
......@@ -15,7 +15,7 @@
/********************************************************/
bool WinEDA_GerberFrame::Clear_Pcb( wxDC* DC, bool query )
bool WinEDA_GerberFrame::Clear_Pcb( bool query )
/********************************************************/
/* Realise les init des pointeurs et variables
......@@ -82,7 +82,7 @@ bool WinEDA_GerberFrame::Clear_Pcb( wxDC* DC, bool query )
/*********************************************************/
void WinEDA_GerberFrame::Erase_Zones( wxDC* DC, bool query )
void WinEDA_GerberFrame::Erase_Zones( bool query )
/*********************************************************/
{
if( query && !IsOK( this, _( "Delete zones ?" ) ) )
......@@ -98,10 +98,9 @@ void WinEDA_GerberFrame::Erase_Zones( wxDC* DC, bool query )
}
/*****************************************************/
void WinEDA_GerberFrame::Erase_Segments_Pcb( wxDC* DC,
bool all_layers, bool query )
/*****************************************************/
/************************************************************************/
void WinEDA_GerberFrame::Erase_Segments_Pcb( bool all_layers, bool query )
/************************************************************************/
{
BOARD_ITEM* PtStruct;
BOARD_ITEM* PtNext;
......@@ -135,10 +134,9 @@ void WinEDA_GerberFrame::Erase_Segments_Pcb( wxDC* DC,
}
/****************************************************************/
void WinEDA_GerberFrame::Erase_Pistes( wxDC* DC, int masque_type,
bool query )
/****************************************************************/
/******************************************************************/
void WinEDA_GerberFrame::Erase_Pistes( int masque_type, bool query )
/******************************************************************/
/* Efface les segments de piste, selon les autorisations affichees
* masque_type = masque des options de selection:
......@@ -166,7 +164,7 @@ void WinEDA_GerberFrame::Erase_Pistes( wxDC* DC, int masque_type,
/*****************************************************************/
void WinEDA_GerberFrame::Erase_Textes_Pcb( wxDC* DC, bool query )
void WinEDA_GerberFrame::Erase_Textes_Pcb( bool query )
/*****************************************************************/
{
BOARD_ITEM* PtStruct;
......@@ -187,9 +185,9 @@ void WinEDA_GerberFrame::Erase_Textes_Pcb( wxDC* DC, bool query )
}
/*******************************************************************/
void WinEDA_GerberFrame::Erase_Current_Layer( wxDC* DC, bool query )
/*******************************************************************/
/*********************************************************/
void WinEDA_GerberFrame::Erase_Current_Layer( bool query )
/*********************************************************/
{
int layer = GetScreen()->m_Active_Layer;
wxString msg;
......
......@@ -393,15 +393,15 @@ public:
// Read/write fonctions:
EDA_BaseStruct* ReadDrawSegmentDescr( FILE* File, int* LineNum );
int ReadListeSegmentDescr( wxDC* DC, FILE* File,
int ReadListeSegmentDescr( FILE* File,
TRACK* PtSegm, int StructType,
int* LineNum, int NumSegm );
int ReadSetup( FILE* File, int* LineNum );
int ReadGeneralDescrPcb( wxDC* DC, FILE* File, int* LineNum );
int ReadGeneralDescrPcb( FILE* File, int* LineNum );
// PCB handling
bool Clear_Pcb( wxDC* DC, bool query );
bool Clear_Pcb( bool query );
/**
* Function PcbGeneralLocateAndDisplay
......@@ -681,12 +681,12 @@ public:
// loading modules: see WinEDA_BasePcbFrame
// Borad handling
void Erase_Zones( wxDC* DC, bool query );
void Erase_Segments_Pcb( wxDC* DC, bool is_edges, bool query );
// Board handling
void Erase_Zones( bool query );
void Erase_Segments_Pcb( bool is_edges, bool query );
void Erase_Pistes( wxDC* DC, int masque_type, bool query );
void Erase_Modules( wxDC* DC, bool query );
void Erase_Textes_Pcb( wxDC* DC, bool query );
void Erase_Modules( bool query );
void Erase_Textes_Pcb( bool query );
void Erase_Marqueurs();
void UnDeleteItem( wxDC* DC );
void RemoveStruct( BOARD_ITEM* Item, wxDC* DC );
......@@ -902,12 +902,12 @@ public:
void Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC );
// PCB handling
bool Clear_Pcb( wxDC* DC, bool query );
void Erase_Current_Layer( wxDC* DC, bool query );
void Erase_Zones( wxDC* DC, bool query );
void Erase_Segments_Pcb( wxDC* DC, bool is_edges, bool query );
void Erase_Pistes( wxDC* DC, int masque_type, bool query );
void Erase_Textes_Pcb( wxDC* DC, bool query );
bool Clear_Pcb( bool query );
void Erase_Current_Layer( bool query );
void Erase_Zones( bool query );
void Erase_Segments_Pcb( bool is_edges, bool query );
void Erase_Pistes( int masque_type, bool query );
void Erase_Textes_Pcb( bool query );
void UnDeleteItem( wxDC* DC );
void Delete_DCode_Items( wxDC* DC, int dcode_value, int layer_number );
......
......@@ -34,7 +34,7 @@ void WinEDA_PcbFrame::Files_io( wxCommandEvent& event )
{
case ID_MENU_LOAD_FILE:
case ID_LOAD_FILE:
Clear_Pcb( &dc, TRUE );
Clear_Pcb(TRUE );
LoadOnePcbFile( wxEmptyString, &dc, FALSE );
ReCreateAuxiliaryToolbar();
break;
......@@ -64,7 +64,7 @@ void WinEDA_PcbFrame::Files_io( wxCommandEvent& event )
if( !IsOK( this, msg ) )
break;
}
Clear_Pcb( &dc, TRUE );
Clear_Pcb( TRUE );
LoadOnePcbFile( filename, &dc, FALSE );
GetScreen()->m_FileName = oldfilename;
SetTitle( GetScreen()->m_FileName );
......@@ -79,7 +79,7 @@ void WinEDA_PcbFrame::Files_io( wxCommandEvent& event )
case ID_MENU_NEW_BOARD:
case ID_NEW_BOARD:
Clear_Pcb( &dc, TRUE );
Clear_Pcb( TRUE );
GetScreen()->m_FileName.Printf( wxT( "%s%cnoname%s" ),
wxGetCwd().GetData(), DIR_SEP, PcbExtBuffer.GetData() );
SetTitle( GetScreen()->m_FileName );
......@@ -95,7 +95,7 @@ void WinEDA_PcbFrame::Files_io( wxCommandEvent& event )
case ID_LOAD_FILE_8:
case ID_LOAD_FILE_9:
case ID_LOAD_FILE_10:
Clear_Pcb( &dc, TRUE );
Clear_Pcb(TRUE );
wxSetWorkingDirectory( wxPathOnly( GetLastProject( id - ID_LOAD_FILE_1 ) ) );
LoadOnePcbFile( GetLastProject( id - ID_LOAD_FILE_1 ).GetData(),
&dc, FALSE );
......
......@@ -41,38 +41,38 @@ void WinEDA_PcbGlobalDeleteFrame::AcceptPcbDelete( wxCommandEvent& event )
if( m_DelAlls->GetValue() )
{
m_Parent->Clear_Pcb( &dc, TRUE );
m_Parent->Clear_Pcb( TRUE );
redraw = TRUE;
}
else
{
if( m_DelZones->GetValue() )
{
m_Parent->Erase_Zones( &dc, TRUE );
m_Parent->Erase_Zones( TRUE );
redraw = TRUE;
}
if( m_DelTexts->GetValue() )
{
m_Parent->Erase_Textes_Pcb( &dc, TRUE );
m_Parent->Erase_Textes_Pcb( TRUE );
redraw = TRUE;
}
if( m_DelEdges->GetValue() )
{
m_Parent->Erase_Segments_Pcb( &dc, TRUE, TRUE );
m_Parent->Erase_Segments_Pcb( TRUE, TRUE );
redraw = TRUE;
}
if( m_DelDrawings->GetValue() )
{
m_Parent->Erase_Segments_Pcb( &dc, FALSE, TRUE );
m_Parent->Erase_Segments_Pcb( FALSE, TRUE );
redraw = TRUE;
}
if( m_DelModules->GetValue() )
{
m_Parent->Erase_Modules( &dc, TRUE );
m_Parent->Erase_Modules( TRUE );
redraw = TRUE;
}
......@@ -108,7 +108,7 @@ void WinEDA_PcbGlobalDeleteFrame::AcceptPcbDelete( wxCommandEvent& event )
/*********************************************************/
bool WinEDA_BasePcbFrame::Clear_Pcb( wxDC* DC, bool query )
bool WinEDA_BasePcbFrame::Clear_Pcb( bool query )
/*********************************************************/
/* Realise les init des pointeurs et variables
......@@ -146,7 +146,7 @@ bool WinEDA_BasePcbFrame::Clear_Pcb( wxDC* DC, bool query )
m_Pcb->m_Zone = NULL;
m_Pcb->m_NbSegmZone = 0;
DelLimitesZone( DC, FALSE );
DelLimitesZone( NULL, FALSE );
for( ; g_UnDeleteStackPtr != 0; )
{
......@@ -207,7 +207,7 @@ bool WinEDA_BasePcbFrame::Clear_Pcb( wxDC* DC, bool query )
/************************************************************/
void WinEDA_PcbFrame::Erase_Zones( wxDC* DC, bool query )
void WinEDA_PcbFrame::Erase_Zones( bool query )
/************************************************************/
{
if( query && !IsOK( this, _( "Delete Zones ?" ) ) )
......@@ -220,14 +220,14 @@ void WinEDA_PcbFrame::Erase_Zones( wxDC* DC, bool query )
m_Pcb->m_NbSegmZone = 0;
}
DelLimitesZone( DC, FALSE );
DelLimitesZone( NULL, FALSE );
GetScreen()->SetModify();
}
/*****************************************************************************/
void WinEDA_PcbFrame::Erase_Segments_Pcb( wxDC* DC, bool is_edges, bool query )
void WinEDA_PcbFrame::Erase_Segments_Pcb( bool is_edges, bool query )
/*****************************************************************************/
{
BOARD_ITEM* PtStruct;
......@@ -272,7 +272,7 @@ void WinEDA_PcbFrame::Erase_Segments_Pcb( wxDC* DC, bool is_edges, bool query )
/**************************************************************************/
void WinEDA_PcbFrame::Erase_Pistes( wxDC* DC, int masque_type, bool query )
void WinEDA_PcbFrame::Erase_Pistes( wxDC * DC, int masque_type, bool query )
/**************************************************************************/
/* Efface les segments de piste, selon les autorisations affichees
......@@ -304,7 +304,7 @@ void WinEDA_PcbFrame::Erase_Pistes( wxDC* DC, int masque_type, bool query )
/**************************************************************/
void WinEDA_PcbFrame::Erase_Modules( wxDC* DC, bool query )
void WinEDA_PcbFrame::Erase_Modules( bool query )
/**************************************************************/
{
if( query && !IsOK( this, _( "Delete Modules?" ) ) )
......@@ -325,7 +325,7 @@ void WinEDA_PcbFrame::Erase_Modules( wxDC* DC, bool query )
/************************************************************/
void WinEDA_PcbFrame::Erase_Textes_Pcb( wxDC* DC, bool query )
void WinEDA_PcbFrame::Erase_Textes_Pcb( bool query )
/************************************************************/
{
BOARD_ITEM* PtStruct, * PtNext;
......
This diff is collapsed.
......@@ -61,7 +61,7 @@ void WinEDA_ModuleEditFrame::Load_Module_Module_From_BOARD( MODULE* Module )
SetCurItem( NULL );
Clear_Pcb( NULL, TRUE );
Clear_Pcb( TRUE );
m_Pcb->m_Status_Pcb = 0;
NewModule = new MODULE( m_Pcb );
......
......@@ -209,7 +209,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
break;
case ID_MODEDIT_NEW_MODULE:
Clear_Pcb( &dc, TRUE );
Clear_Pcb( TRUE );
GetScreen()->ClearUndoRedoList();
SetCurItem( NULL );
GetScreen()->m_Curseur = wxPoint( 0, 0 );
......@@ -314,7 +314,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_LIBEDIT_IMPORT_PART:
GetScreen()->ClearUndoRedoList();
SetCurItem( NULL );
Clear_Pcb( &dc, TRUE );
Clear_Pcb( TRUE );
GetScreen()->m_Curseur = wxPoint( 0, 0 );
Import_Module( &dc );
if( m_Pcb->m_Modules )
......@@ -342,7 +342,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
{
GetScreen()->ClearUndoRedoList();
SetCurItem( NULL );
Clear_Pcb( &dc, TRUE );
Clear_Pcb( TRUE );
GetScreen()->m_Curseur = wxPoint( 0, 0 );
Load_Module_From_Library( m_CurrentLib, &dc );
if( m_Pcb->m_Modules )
......
......@@ -643,7 +643,7 @@ void WinEDA_BasePcbFrame::DelLimitesZone( wxDC* DC, bool Redraw )
{
next = segment->Next();
if( Redraw )
if( Redraw && DC )
Trace_DrawSegmentPcb( DrawPanel, DC, segment, GR_XOR );
delete segment;
......
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