Fix most GCC 4.6 compiler warnings and minor bug fix.
* Remove most (not all) variables that were initialized but never used that cause GCC 4.6 to generate a warning. * Fix bug in schematic library editor best zoom calculation.
This commit is contained in:
parent
e42591af51
commit
a367dea4db
|
@ -630,7 +630,6 @@ void Pcb3D_GLCanvas::TakeScreenshot( wxCommandEvent& event )
|
|||
wxYield();
|
||||
}
|
||||
|
||||
wxSize image_size = GetClientSize();
|
||||
struct vieport_params
|
||||
{
|
||||
GLint originx;
|
||||
|
|
|
@ -237,7 +237,7 @@ void HPGL_PLOTTER::flash_pad_oval( wxPoint pos, wxSize size, int orient,
|
|||
GRTraceMode trace_mode )
|
||||
{
|
||||
wxASSERT( output_file );
|
||||
int rayon, deltaxy, cx, cy;
|
||||
int deltaxy, cx, cy;
|
||||
|
||||
/* The pad is reduced to an oval with size.y > size.x
|
||||
* (Oval vertical orientation 0)
|
||||
|
@ -249,7 +249,6 @@ void HPGL_PLOTTER::flash_pad_oval( wxPoint pos, wxSize size, int orient,
|
|||
orient -= 3600;
|
||||
}
|
||||
deltaxy = size.y - size.x; /* distance between centers of the oval */
|
||||
rayon = size.x / 2;
|
||||
|
||||
if( trace_mode == FILLED )
|
||||
{
|
||||
|
|
|
@ -880,9 +880,6 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
|
|||
INSTALL_UNBUFFERED_DC( DC, this );
|
||||
DC.SetBackground( *wxBLACK_BRUSH );
|
||||
|
||||
/* Compute the cursor position in screen (device) units. */
|
||||
wxPoint pos = CalcUnscrolledPosition( event.GetPosition() );
|
||||
|
||||
/* Compute the cursor position in drawing (logical) units. */
|
||||
screen->SetMousePosition( event.GetLogicalPosition( DC ) );
|
||||
|
||||
|
|
|
@ -438,19 +438,17 @@ bool WinEDA_App::SetBinDir()
|
|||
char Line[1024];
|
||||
char FileName[1024];
|
||||
wxString str_arg0;
|
||||
int ii;
|
||||
char* res;
|
||||
|
||||
FileName[0] = 0;
|
||||
str_arg0 = argv[0];
|
||||
if( strchr( (const char*) argv[0], '/' ) == NULL ) // no path
|
||||
{
|
||||
sprintf( FileName, "which %s > %s", TO_UTF8( str_arg0 ), TMP_FILE );
|
||||
ii = system( FileName );
|
||||
system( FileName );
|
||||
|
||||
if( ( ftmp = fopen( TMP_FILE, "rt" ) ) != NULL )
|
||||
{
|
||||
res = fgets( Line, 1000, ftmp );
|
||||
fgets( Line, 1000, ftmp );
|
||||
fclose( ftmp );
|
||||
remove( TMP_FILE );
|
||||
}
|
||||
|
|
|
@ -98,19 +98,16 @@ void SCH_EDIT_FRAME::InitBlockPasteInfos()
|
|||
*/
|
||||
void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
||||
{
|
||||
bool err = false;
|
||||
BLOCK_SELECTOR* block = &GetScreen()->m_BlockLocate;
|
||||
|
||||
if( !DrawPanel->IsMouseCaptured() )
|
||||
{
|
||||
err = true;
|
||||
DisplayError( this, wxT( "HandleBlockPLace() : m_mouseCaptureCallback = NULL" ) );
|
||||
}
|
||||
|
||||
if( block->GetCount() == 0 )
|
||||
{
|
||||
wxString msg;
|
||||
err = true;
|
||||
msg.Printf( wxT( "HandleBlockPLace() error : no items to place (cmd %d, state %d)" ),
|
||||
block->m_Command, block->m_State );
|
||||
DisplayError( this, msg );
|
||||
|
@ -121,7 +118,6 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
|||
switch( block->m_Command )
|
||||
{
|
||||
case BLOCK_IDLE:
|
||||
err = true;
|
||||
break;
|
||||
|
||||
case BLOCK_ROTATE:
|
||||
|
|
|
@ -199,12 +199,10 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
|
|||
*/
|
||||
void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
||||
{
|
||||
bool err = false;
|
||||
wxPoint pt;
|
||||
|
||||
if( !DrawPanel->IsMouseCaptured() )
|
||||
{
|
||||
err = true;
|
||||
DisplayError( this, wxT( "HandleBlockPLace : m_mouseCaptureCallback = NULL" ) );
|
||||
}
|
||||
|
||||
|
@ -213,7 +211,6 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
|||
switch( GetScreen()->m_BlockLocate.m_Command )
|
||||
{
|
||||
case BLOCK_IDLE:
|
||||
err = true;
|
||||
break;
|
||||
|
||||
case BLOCK_DRAG: /* Drag */
|
||||
|
|
|
@ -1169,11 +1169,10 @@ bool LIB_COMPONENT::SaveDateAndTime( FILE* aFile )
|
|||
bool LIB_COMPONENT::LoadDateAndTime( char* aLine )
|
||||
{
|
||||
int year, mon, day, hour, min, sec;
|
||||
char* text;
|
||||
|
||||
year = mon = day = hour = min = sec = 0;
|
||||
text = strtok( aLine, " \r\t\n" );
|
||||
text = strtok( NULL, " \r\t\n" );
|
||||
strtok( aLine, " \r\t\n" );
|
||||
strtok( NULL, " \r\t\n" );
|
||||
|
||||
if (sscanf( aLine, "%d/%d/%d %d:%d:%d", &year, &mon, &day, &hour, &min, &sec ) != 6 )
|
||||
return false;
|
||||
|
|
|
@ -100,14 +100,12 @@ void DIALOG_SVG_PRINT::PrintSVGDoc( bool aPrintAll, bool aPrint_Sheet_Ref )
|
|||
ReturnValueFromTextCtrl( *m_DialogPenWidth, m_Parent->m_InternalUnits );
|
||||
|
||||
SCH_SCREEN* screen = (SCH_SCREEN*) m_Parent->GetScreen();
|
||||
SCH_SCREEN* oldscreen = screen;
|
||||
|
||||
if( aPrintAll && m_Parent->m_Ident == SCHEMATIC_FRAME )
|
||||
{
|
||||
SCH_EDIT_FRAME* schframe = (SCH_EDIT_FRAME*) m_Parent;
|
||||
SCH_SHEET_PATH* sheetpath, * oldsheetpath = schframe->GetSheet();
|
||||
SCH_SCREEN* schscreen = schframe->GetScreen();
|
||||
oldscreen = schscreen;
|
||||
SCH_SHEET_LIST SheetList( NULL );
|
||||
sheetpath = SheetList.GetFirst();
|
||||
SCH_SHEET_PATH list;
|
||||
|
|
|
@ -278,13 +278,8 @@ An alias %s already exists!\nCannot update this component" ),
|
|||
}
|
||||
|
||||
|
||||
/**************************************************************************************/
|
||||
void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::addFieldButtonHandler( wxCommandEvent& event )
|
||||
/**************************************************************************************/
|
||||
{
|
||||
SCH_EDIT_FRAME* frame;
|
||||
frame = (SCH_EDIT_FRAME*) wxGetApp().GetTopWindow();
|
||||
|
||||
// in case m_FieldsBuf[REFERENCE].m_Orient has changed on screen only, grab
|
||||
// screen contents.
|
||||
if( !copyPanelToSelectedField() )
|
||||
|
|
|
@ -592,10 +592,6 @@ void LIB_ARC::calcEdit( const wxPoint& aPosition )
|
|||
startPos = m_ArcStart;
|
||||
endPos = m_ArcEnd;
|
||||
|
||||
wxPoint middlePoint = wxPoint( (startPos.x + endPos.x) / 2,
|
||||
(startPos.y + endPos.y) / 2 );
|
||||
|
||||
|
||||
// If the distance is too small, use the old center point
|
||||
// else the new center point is calculated over the three points start/end/cursor
|
||||
if( DistanceLinePoint( startPos, endPos, aPosition ) > MINIMUM_SELECTION_DISTANCE )
|
||||
|
|
|
@ -1756,7 +1756,6 @@ EDA_RECT LIB_PIN::GetBoundingBox() const
|
|||
int nameTextOffset = 0;
|
||||
bool showName = !m_name.IsEmpty() && (m_name != wxT( "~" ));
|
||||
bool showNum = m_number != 0;
|
||||
int symbolX = TARGET_PIN_DIAM / 2;
|
||||
int symbolY = TARGET_PIN_DIAM / 2;
|
||||
|
||||
if( entry )
|
||||
|
@ -1776,7 +1775,7 @@ EDA_RECT LIB_PIN::GetBoundingBox() const
|
|||
int numberTextHeight = showNum ? wxRound( m_PinNumSize * 1.1 ) : 0;
|
||||
|
||||
if( m_shape & INVERT )
|
||||
symbolX = symbolY = INVERT_PIN_RADIUS;
|
||||
symbolY = INVERT_PIN_RADIUS;
|
||||
|
||||
// calculate top left corner position
|
||||
// for the default pin orientation (PIN_RIGHT)
|
||||
|
|
|
@ -118,8 +118,6 @@ void LIB_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& aPosition )
|
|||
*/
|
||||
void LIB_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& aPosition )
|
||||
{
|
||||
wxPoint pos = GetPosition();
|
||||
|
||||
if( m_component == NULL )
|
||||
return;
|
||||
|
||||
|
|
|
@ -378,7 +378,7 @@ int LIB_EDIT_FRAME::BestZoom()
|
|||
double margin_scale_factor = 0.8;
|
||||
double zx =(double) dx / ( margin_scale_factor * (double)size.x ) *
|
||||
(double) GetScreen()->m_ZoomScalar;
|
||||
double zy = (double) dx / ( margin_scale_factor * (double)size.y) *
|
||||
double zy = (double) dy / ( margin_scale_factor * (double)size.y) *
|
||||
(double) GetScreen()->m_ZoomScalar;
|
||||
|
||||
int bestzoom = wxRound( MAX( zx, zy ) );
|
||||
|
|
|
@ -85,14 +85,11 @@ void FreeNetObjectsList( NETLIST_OBJECT_LIST& aNetObjectsBuffer )
|
|||
*/
|
||||
void SCH_EDIT_FRAME::BuildNetListBase()
|
||||
{
|
||||
int NetNumber;
|
||||
int NetCode;
|
||||
SCH_SHEET_PATH* sheet;
|
||||
wxString msg, activity;
|
||||
wxBusyCursor Busy;
|
||||
|
||||
NetNumber = 1;
|
||||
|
||||
activity = _( "Building net list:" );
|
||||
SetStatusText( activity );
|
||||
|
||||
|
@ -104,6 +101,7 @@ void SCH_EDIT_FRAME::BuildNetListBase()
|
|||
/* Fill g_NetObjectslist with items used in connectivity calculation */
|
||||
|
||||
sheet = SheetListList.GetFirst();
|
||||
|
||||
for( ; sheet != NULL; sheet = SheetListList.GetNext() )
|
||||
AddConnectedObjects( sheet, g_NetObjectslist );
|
||||
|
||||
|
@ -788,7 +786,6 @@ int IsBusLabel( const wxString& LabelDrawList )
|
|||
int ii;
|
||||
wxString BufLine;
|
||||
long tmp;
|
||||
bool error = FALSE;
|
||||
|
||||
/* Search for '[' because a bus label is like "busname[nn..mm]" */
|
||||
ii = LabelDrawList.Find( '[' );
|
||||
|
@ -806,10 +803,9 @@ int IsBusLabel( const wxString& LabelDrawList )
|
|||
Num++;
|
||||
}
|
||||
|
||||
if( !BufLine.ToLong( &tmp ) )
|
||||
error = true;
|
||||
|
||||
BufLine.ToLong( &tmp );
|
||||
FirstNumWireBus = tmp;
|
||||
|
||||
while( LabelDrawList[Num] == '.' && Num < LabelDrawList.Len() )
|
||||
Num++;
|
||||
|
||||
|
@ -820,18 +816,17 @@ int IsBusLabel( const wxString& LabelDrawList )
|
|||
Num++;
|
||||
}
|
||||
|
||||
if( !BufLine.ToLong( &tmp ) )
|
||||
error = true;
|
||||
BufLine.ToLong( &tmp );
|
||||
LastNumWireBus = tmp;
|
||||
|
||||
if( FirstNumWireBus < 0 )
|
||||
FirstNumWireBus = 0;
|
||||
|
||||
if( LastNumWireBus < 0 )
|
||||
LastNumWireBus = 0;
|
||||
|
||||
if( FirstNumWireBus > LastNumWireBus )
|
||||
{
|
||||
EXCHG( FirstNumWireBus, LastNumWireBus );
|
||||
}
|
||||
|
||||
return LastNumWireBus - FirstNumWireBus + 1;
|
||||
}
|
||||
|
|
|
@ -312,7 +312,6 @@ void SCH_EDIT_FRAME::OnLeftDClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
|
||||
{
|
||||
EDA_ITEM* item = GetScreen()->GetCurItem();
|
||||
wxPoint pos = aPosition;
|
||||
|
||||
switch( GetToolId() )
|
||||
{
|
||||
|
|
|
@ -423,8 +423,6 @@ bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint
|
|||
|
||||
if( match )
|
||||
{
|
||||
EDA_RECT BoundaryBox = GetBoundingBox();
|
||||
|
||||
if( aFindLocation )
|
||||
*aFindLocation = GetBoundingBox().Centre();
|
||||
|
||||
|
|
|
@ -233,8 +233,6 @@ void GERBVIEW_FRAME::SaveSettings()
|
|||
|
||||
wxGetApp().SaveCurrentSetupValues( GetConfigurationSettings() );
|
||||
|
||||
wxRealPoint GridSize = GetScreen()->GetGridSize();
|
||||
|
||||
long pageSize_opt = 0;
|
||||
|
||||
if( m_Draw_Sheet_Ref )
|
||||
|
|
|
@ -17,30 +17,24 @@
|
|||
|
||||
void GERBVIEW_FRAME::ReCreateHToolbar( void )
|
||||
{
|
||||
int layer = 0;
|
||||
GERBER_IMAGE* gerber = NULL;
|
||||
int ii;
|
||||
wxString msg;
|
||||
|
||||
if( m_HToolBar != NULL )
|
||||
return;
|
||||
|
||||
if( GetScreen() )
|
||||
{
|
||||
layer = getActiveLayer();
|
||||
gerber = g_GERBER_List[layer];
|
||||
}
|
||||
|
||||
m_HToolBar = new EDA_TOOLBAR( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE );
|
||||
|
||||
// Set up toolbar
|
||||
m_HToolBar->AddTool( ID_GERBVIEW_ERASE_ALL, wxEmptyString, wxBitmap( gerbview_clear_layers_xpm ),
|
||||
m_HToolBar->AddTool( ID_GERBVIEW_ERASE_ALL, wxEmptyString,
|
||||
wxBitmap( gerbview_clear_layers_xpm ),
|
||||
_( "Erase all layers" ) );
|
||||
|
||||
m_HToolBar->AddTool( wxID_FILE, wxEmptyString, wxBitmap( gerber_file_xpm ),
|
||||
_( "Load a new Gerber file on the current layer. Previous data will be deleted" ) );
|
||||
|
||||
m_HToolBar->AddTool( ID_GERBVIEW_LOAD_DRILL_FILE, wxEmptyString, wxBitmap( gerbview_drill_file_xpm ),
|
||||
m_HToolBar->AddTool( ID_GERBVIEW_LOAD_DRILL_FILE, wxEmptyString,
|
||||
wxBitmap( gerbview_drill_file_xpm ),
|
||||
_( "Load an excellon drill file on the current layer. Previous data will be deleted" ) );
|
||||
|
||||
m_HToolBar->AddSeparator();
|
||||
|
@ -63,9 +57,10 @@ void GERBVIEW_FRAME::ReCreateHToolbar( void )
|
|||
m_HToolBar->AddSeparator();
|
||||
|
||||
wxArrayString choices;
|
||||
|
||||
for( ii = 0; ii < 32; ii++ )
|
||||
{
|
||||
msg.Printf( _( "Layer %d" ), ii + 1);
|
||||
msg.Printf( _( "Layer %d" ), ii + 1 );
|
||||
choices.Add( msg );
|
||||
}
|
||||
|
||||
|
@ -85,8 +80,7 @@ void GERBVIEW_FRAME::ReCreateHToolbar( void )
|
|||
m_DCodesList.Add( msg );
|
||||
}
|
||||
|
||||
m_DCodeSelector = new DCODE_SELECTION_BOX(
|
||||
m_HToolBar, ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE,
|
||||
m_DCodeSelector = new DCODE_SELECTION_BOX( m_HToolBar, ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE,
|
||||
wxDefaultPosition, wxSize( 150, -1 ),
|
||||
m_DCodesList );
|
||||
m_HToolBar->AddControl( m_DCodeSelector );
|
||||
|
|
|
@ -216,13 +216,11 @@ void TREE_PROJECT_FRAME::OnDragStart( wxTreeEvent& event )
|
|||
|
||||
m_TreeProject->SelectItem( curr_item );
|
||||
TREEPROJECT_ITEM* data = GetSelectedData();
|
||||
|
||||
if( data->GetFileName() == m_Parent->m_ProjectFileName.GetFullPath() )
|
||||
return;
|
||||
|
||||
wxTreeItemId id = m_TreeProject->GetSelection();
|
||||
|
||||
wxImage img =
|
||||
m_TreeProject->GetImageList()->GetBitmap( data->GetType() - 1 ).ConvertToImage();
|
||||
wxImage img = m_TreeProject->GetImageList()->GetBitmap( data->GetType() - 1 ).ConvertToImage();
|
||||
m_DragCursor = wxCursor( img );
|
||||
m_Parent->wxWindow::SetCursor( (wxCursor &)m_DragCursor );
|
||||
event.Allow();
|
||||
|
@ -235,7 +233,6 @@ void TREE_PROJECT_FRAME::OnDragEnd( wxTreeEvent& event )
|
|||
{
|
||||
m_Parent->SetCursor( wxNullCursor );
|
||||
|
||||
wxTreeItemId moved = m_TreeProject->GetSelection();
|
||||
TREEPROJECT_ITEM* source_data = GetSelectedData();
|
||||
wxTreeItemId dest = event.GetItem();
|
||||
|
||||
|
|
|
@ -198,11 +198,8 @@ int PCB_EDIT_FRAME::ReturnBlockCommand( int aKey )
|
|||
*/
|
||||
void PCB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
||||
{
|
||||
bool err = false;
|
||||
|
||||
if( !DrawPanel->IsMouseCaptured() )
|
||||
{
|
||||
err = true;
|
||||
DisplayError( this, wxT( "Error in HandleBlockPLace : m_mouseCaptureCallback = NULL" ) );
|
||||
}
|
||||
|
||||
|
@ -211,7 +208,6 @@ void PCB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
|||
switch( GetScreen()->m_BlockLocate.m_Command )
|
||||
{
|
||||
case BLOCK_IDLE:
|
||||
err = true;
|
||||
break;
|
||||
|
||||
case BLOCK_DRAG: /* Drag */
|
||||
|
|
|
@ -212,12 +212,10 @@ void WinEDA_ModuleEditFrame::HandleBlockPlace( wxDC* DC )
|
|||
* - block copy & paste
|
||||
*/
|
||||
{
|
||||
bool err = FALSE;
|
||||
MODULE* currentModule = GetBoard()->m_Modules;
|
||||
|
||||
if( !DrawPanel->IsMouseCaptured() )
|
||||
{
|
||||
err = TRUE;
|
||||
DisplayError( this, wxT( "HandleBlockPLace : m_mouseCaptureCallback = NULL" ) );
|
||||
}
|
||||
|
||||
|
@ -226,7 +224,6 @@ void WinEDA_ModuleEditFrame::HandleBlockPlace( wxDC* DC )
|
|||
switch( GetScreen()->m_BlockLocate.m_Command )
|
||||
{
|
||||
case BLOCK_IDLE:
|
||||
err = TRUE;
|
||||
break;
|
||||
|
||||
case BLOCK_DRAG: /* Drag */
|
||||
|
|
|
@ -356,7 +356,6 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wx
|
|||
// see pcbstruct.h
|
||||
void DRAWSEGMENT::DisplayInfo( EDA_DRAW_FRAME* frame )
|
||||
{
|
||||
int itype;
|
||||
wxString msg;
|
||||
wxString coords;
|
||||
|
||||
|
@ -365,8 +364,6 @@ void DRAWSEGMENT::DisplayInfo( EDA_DRAW_FRAME* frame )
|
|||
|
||||
frame->ClearMsgPanel();
|
||||
|
||||
itype = m_Type & 0x0F;
|
||||
|
||||
msg = wxT( "DRAWING" );
|
||||
|
||||
frame->AppendMsgPanel( _( "Type" ), msg, DARKCYAN );
|
||||
|
|
|
@ -151,7 +151,6 @@ void EDGE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wx
|
|||
int ux0, uy0, dx, dy, rayon, StAngle, EndAngle;
|
||||
int color, type_trace;
|
||||
int typeaff;
|
||||
PCB_SCREEN* screen;
|
||||
PCB_BASE_FRAME* frame;
|
||||
MODULE* module = (MODULE*) m_Parent;
|
||||
|
||||
|
@ -166,8 +165,6 @@ void EDGE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wx
|
|||
|
||||
frame = (PCB_BASE_FRAME*) panel->GetParent();
|
||||
|
||||
screen = frame->GetScreen();
|
||||
|
||||
type_trace = m_Shape;
|
||||
|
||||
ux0 = m_Start.x - offset.x;
|
||||
|
|
|
@ -50,10 +50,13 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDraw_mode, const wxPoi
|
|||
{
|
||||
int color = 0;
|
||||
wxSize mask_margin; // margin (clearance) used for some non copper layers
|
||||
|
||||
#ifdef SHOW_PADMASK_REAL_SIZE_AND_COLOR
|
||||
int showActualMaskSize = 0; /* == layer number if the actual pad size on mask layer can be displayed
|
||||
* i.e. if only one layer is shown for this pad
|
||||
* and this layer is a mask (solder mask or sloder paste
|
||||
*/
|
||||
#endif
|
||||
|
||||
if( m_Flags & DO_NOT_DRAW )
|
||||
return;
|
||||
|
@ -142,12 +145,16 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDraw_mode, const wxPoi
|
|||
|
||||
case SOLDERPASTE_LAYER_BACK:
|
||||
color = brd->GetLayerColor( SOLDERPASTE_N_BACK );
|
||||
#ifdef SHOW_PADMASK_REAL_SIZE_AND_COLOR
|
||||
showActualMaskSize = SOLDERPASTE_N_BACK;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case SOLDERPASTE_LAYER_FRONT:
|
||||
color = brd->GetLayerColor( SOLDERPASTE_N_FRONT );
|
||||
#ifdef SHOW_PADMASK_REAL_SIZE_AND_COLOR
|
||||
showActualMaskSize = SOLDERPASTE_N_FRONT;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case SILKSCREEN_LAYER_BACK:
|
||||
|
@ -160,12 +167,16 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDraw_mode, const wxPoi
|
|||
|
||||
case SOLDERMASK_LAYER_BACK:
|
||||
color = brd->GetLayerColor( SOLDERMASK_N_BACK );
|
||||
#ifdef SHOW_PADMASK_REAL_SIZE_AND_COLOR
|
||||
showActualMaskSize = SOLDERMASK_N_BACK;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case SOLDERMASK_LAYER_FRONT:
|
||||
color = brd->GetLayerColor( SOLDERMASK_N_FRONT );
|
||||
#ifdef SHOW_PADMASK_REAL_SIZE_AND_COLOR
|
||||
showActualMaskSize = SOLDERMASK_N_FRONT;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case DRAW_LAYER:
|
||||
|
|
|
@ -337,7 +337,6 @@ void TEXTE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const w
|
|||
int width, color, orient;
|
||||
wxSize size;
|
||||
wxPoint pos; // Center of text
|
||||
PCB_SCREEN* screen;
|
||||
PCB_BASE_FRAME* frame;
|
||||
MODULE* Module = (MODULE*) m_Parent; /* parent must *not* be null
|
||||
* (a module text without a footprint
|
||||
|
@ -347,7 +346,6 @@ void TEXTE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const w
|
|||
if( panel == NULL )
|
||||
return;
|
||||
|
||||
screen = (PCB_SCREEN*) panel->GetScreen();
|
||||
frame = (PCB_BASE_FRAME*) panel->GetParent();
|
||||
|
||||
pos.x = m_Pos.x - offset.x;
|
||||
|
|
|
@ -238,7 +238,6 @@ int ZONE_CONTAINER::ReadDescr( LINE_READER* aReader )
|
|||
char* Line, * text;
|
||||
char netname_buffer[1024];
|
||||
int ret;
|
||||
int n_corner_item = 0;
|
||||
int outline_hatch = CPolyLine::NO_HATCH;
|
||||
bool error = false, has_corner = false;
|
||||
|
||||
|
@ -307,8 +306,6 @@ int ZONE_CONTAINER::ReadDescr( LINE_READER* aReader )
|
|||
error = true;
|
||||
else
|
||||
{
|
||||
n_corner_item = x;
|
||||
|
||||
switch( hopt[0] )
|
||||
{
|
||||
case 'n':
|
||||
|
|
|
@ -577,8 +577,7 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode()
|
|||
{
|
||||
TRACK* pt_piste;
|
||||
TRACK* pt_next;
|
||||
int a_color;
|
||||
char new_passe_request = 1, flag;
|
||||
char new_passe_request = 1;
|
||||
|
||||
std::vector<D_PAD*> sortedPads;
|
||||
BOARD_ITEM* PtStruct;
|
||||
|
@ -621,7 +620,6 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode()
|
|||
pt_piste = m_Pcb->m_Track;
|
||||
for( ; pt_piste != NULL; pt_piste = pt_piste->Next() )
|
||||
{
|
||||
flag = 0;
|
||||
masque_layer = g_TabOneLayerMask[pt_piste->GetLayer()];
|
||||
|
||||
/* Search for a pad on the segment starting point */
|
||||
|
@ -676,8 +674,6 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode()
|
|||
/* Propagate net codes from a segment to an other segment */
|
||||
/**********************************************************/
|
||||
|
||||
a_color = YELLOW;
|
||||
|
||||
while( new_passe_request )
|
||||
{
|
||||
bool reset_flag = FALSE;
|
||||
|
|
|
@ -198,22 +198,18 @@ static void Abort_EditEdge( EDA_DRAW_PANEL* Panel, wxDC* DC )
|
|||
|
||||
/* Initialize the drawing of a segment of type other than trace.
|
||||
*/
|
||||
DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment,
|
||||
int shape, wxDC* DC )
|
||||
DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment, int shape, wxDC* DC )
|
||||
{
|
||||
int s_large;
|
||||
int angle = 0;
|
||||
DRAWSEGMENT* DrawItem;
|
||||
|
||||
s_large = GetBoard()->GetBoardDesignSettings()->m_DrawSegmentWidth;
|
||||
|
||||
if( getActiveLayer() == EDGE_N )
|
||||
{
|
||||
s_large = GetBoard()->GetBoardDesignSettings()->m_EdgeSegmentWidth;
|
||||
}
|
||||
|
||||
if( shape == S_ARC )
|
||||
angle = 900;
|
||||
|
||||
if( Segment == NULL ) /* Create new trace. */
|
||||
{
|
||||
SetCurItem( Segment = new DRAWSEGMENT( GetBoard() ) );
|
||||
|
@ -262,6 +258,7 @@ DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Segment;
|
||||
}
|
||||
|
||||
|
|
|
@ -298,12 +298,11 @@ void TraceSegmentPcb( BOARD* Pcb,
|
|||
int marge,
|
||||
int op_logique )
|
||||
{
|
||||
int demi_pas, demi_largeur;
|
||||
int demi_largeur;
|
||||
int ux0, uy0, ux1, uy1;
|
||||
|
||||
|
||||
demi_pas = Board.m_GridRouting / 2;
|
||||
demi_largeur = ( pt_segm->m_Width / 2 ) + marge;
|
||||
|
||||
/* Calculate the bounding rectangle of the segment (if H, V or Via) */
|
||||
ux0 = pt_segm->m_Start.x - Pcb->m_BoundaryBox.m_Pos.x;
|
||||
uy0 = pt_segm->m_Start.y - Pcb->m_BoundaryBox.m_Pos.y;
|
||||
|
|
|
@ -177,7 +177,6 @@ MODULE* Locate_Prefered_Module( BOARD* aPcb, const wxPoint& aPosition, int aActi
|
|||
bool aVisibleOnly, bool aIgnoreLocked )
|
||||
{
|
||||
MODULE* pt_module;
|
||||
int lx, ly;
|
||||
MODULE* module = NULL;
|
||||
MODULE* Altmodule = NULL;
|
||||
int min_dim = 0x7FFFFFFF;
|
||||
|
@ -220,8 +219,6 @@ MODULE* Locate_Prefered_Module( BOARD* aPcb, const wxPoint& aPosition, int aActi
|
|||
|
||||
//off x & offy point to the middle of the box.
|
||||
int dist = abs( aPosition.x - offx ) + abs( aPosition.y - offy );
|
||||
lx = pt_module->m_BoundaryBox.GetWidth();
|
||||
ly = pt_module->m_BoundaryBox.GetHeight();
|
||||
|
||||
//int dist = MIN(lx, ly); // to pick the smallest module (kinda
|
||||
// screwy with same-sized modules -- this is bad!)
|
||||
|
|
|
@ -392,7 +392,6 @@ bool WinEDA_ModuleEditFrame::OnRightClick( const wxPoint& MousePos, wxMenu* PopM
|
|||
void WinEDA_ModuleEditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
|
||||
{
|
||||
BOARD_ITEM* item = GetCurItem();
|
||||
wxPoint pos = GetPosition();
|
||||
|
||||
switch( GetToolId() )
|
||||
{
|
||||
|
|
|
@ -102,13 +102,9 @@ static void Show_Pad_Move( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPo
|
|||
*/
|
||||
void PCB_BASE_FRAME::Export_Pad_Settings( D_PAD* pt_pad )
|
||||
{
|
||||
MODULE* Module;
|
||||
|
||||
if( pt_pad == NULL )
|
||||
return;
|
||||
|
||||
Module = (MODULE*) pt_pad->GetParent();
|
||||
|
||||
pt_pad->DisplayInfo( this );
|
||||
|
||||
g_Pad_Master.m_PadShape = pt_pad->m_PadShape;
|
||||
|
@ -270,13 +266,9 @@ void PCB_BASE_FRAME::DeletePad( D_PAD* aPad, bool aQuery )
|
|||
/* Function to initialize the "move pad" command */
|
||||
void PCB_BASE_FRAME::StartMovePad( D_PAD* Pad, wxDC* DC )
|
||||
{
|
||||
MODULE* Module;
|
||||
|
||||
if( Pad == NULL )
|
||||
return;
|
||||
|
||||
Module = (MODULE*) Pad->GetParent();
|
||||
|
||||
s_CurrentSelectedPad = Pad;
|
||||
Pad_OldPos = Pad->m_Pos;
|
||||
Pad->DisplayInfo( this );
|
||||
|
@ -316,8 +308,6 @@ void PCB_BASE_FRAME::PlacePad( D_PAD* Pad, wxDC* DC )
|
|||
Track = g_DragSegmentList[ii].m_Segm;
|
||||
|
||||
// Set the old state
|
||||
wxPoint t_start = Track->m_Start;
|
||||
wxPoint t_end = Track->m_End;
|
||||
if( g_DragSegmentList[ii].m_Pad_Start )
|
||||
Track->m_Start = Pad_OldPos;
|
||||
if( g_DragSegmentList[ii].m_Pad_End )
|
||||
|
@ -331,6 +321,7 @@ void PCB_BASE_FRAME::PlacePad( D_PAD* Pad, wxDC* DC )
|
|||
wxPoint pad_curr_position = Pad->m_Pos;
|
||||
|
||||
Pad->m_Pos = Pad_OldPos;
|
||||
|
||||
if( g_DragSegmentList.size() == 0 )
|
||||
SaveCopyInUndoList( Module, UR_CHANGED );
|
||||
else
|
||||
|
@ -355,6 +346,7 @@ void PCB_BASE_FRAME::PlacePad( D_PAD* Pad, wxDC* DC )
|
|||
Track->m_End = Pad->m_Pos;
|
||||
|
||||
Track->SetState( IN_EDIT, OFF );
|
||||
|
||||
if( DC )
|
||||
Track->Draw( DrawPanel, DC, GR_OR );
|
||||
}
|
||||
|
|
|
@ -904,16 +904,14 @@ int NETLIST_READER::BuildComponentsListFromNetlist( const wxString& aNetlistFile
|
|||
|
||||
if( state == 2 )
|
||||
{
|
||||
bool error = false;
|
||||
// skip TimeStamp:
|
||||
if( strtok( Line, " ()\t\n" ) == NULL )
|
||||
error = true;
|
||||
strtok( Line, " ()\t\n" );
|
||||
|
||||
// skip footprint name:
|
||||
if( ( strtok( NULL, " ()\t\n" ) ) == NULL )
|
||||
error = true;
|
||||
strtok( NULL, " ()\t\n" );
|
||||
|
||||
// Load the reference of the component:
|
||||
if( ( text = strtok( NULL, " ()\t\n" ) ) == NULL )
|
||||
error = true;
|
||||
text = strtok( NULL, " ()\t\n" );
|
||||
component_count++;
|
||||
aBufName.Add( FROM_UTF8( text ) );
|
||||
continue;
|
||||
|
|
|
@ -554,8 +554,6 @@ void PCB_EDIT_FRAME::SaveSettings()
|
|||
|
||||
PCB_BASE_FRAME::SaveSettings();
|
||||
|
||||
wxRealPoint GridSize = GetScreen()->GetGridSize();
|
||||
|
||||
config->Write( OPTKEY_DEFAULT_LINEWIDTH_VALUE, g_DrawDefaultLineThickness );
|
||||
long tmp = GetBoard()->IsElementVisible(RATSNEST_VISIBLE);
|
||||
config->Write( PCB_SHOW_FULL_RATSNET_OPT, tmp );
|
||||
|
|
|
@ -375,7 +375,7 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe,
|
|||
long curcell, newcell, buddy, lastopen, lastclos, lastmove;
|
||||
int newdist, olddir, _self;
|
||||
int current_net_code;
|
||||
int marge, via_marge;
|
||||
int marge;
|
||||
int pad_masque_layer_s; /* Mask layers belonging to the
|
||||
*starting pad. */
|
||||
int pad_masque_layer_e; /* Mask layers belonging to the ending
|
||||
|
@ -396,7 +396,6 @@ static int Autoroute_One_Track( PCB_EDIT_FRAME* pcbframe,
|
|||
|
||||
marge = s_Clearance +
|
||||
( pcbframe->GetBoard()->GetCurrentTrackWidth() / 2 );
|
||||
via_marge = s_Clearance + ( pcbframe->GetBoard()->GetCurrentViaSize() / 2 );
|
||||
|
||||
/* clear direction flags */
|
||||
i = Nrows * Ncols * sizeof(DIR_CELL);
|
||||
|
|
|
@ -260,10 +260,8 @@ void Trace_Pads_Only( EDA_DRAW_PANEL* panel, wxDC* DC, MODULE* Module,
|
|||
int ox, int oy, int MasqueLayer, int draw_mode )
|
||||
{
|
||||
int tmp;
|
||||
PCB_SCREEN* screen;
|
||||
PCB_BASE_FRAME* frame;
|
||||
|
||||
screen = (PCB_SCREEN*) panel->GetScreen();
|
||||
frame = (PCB_BASE_FRAME*) panel->GetParent();
|
||||
|
||||
tmp = frame->m_DisplayPadFill;
|
||||
|
|
Loading…
Reference in New Issue