Commit 161068b1 authored by stambaughw's avatar stambaughw

Minor bug and compiler warning fixes.

* Applied sheet reference plotting patch from Lorenzo.
* Fixed bug in Pcbnew plot dialog, ignore user scaling when controls are disabled.
parent fd0e99bb
......@@ -236,7 +236,8 @@ void WinEDA_DrawFrame::PlotWorkSheet( int format_plot, BASE_SCREEN* screen )
gypas = ( yg - ref.y) / ipas;
for( ii = ref.y + gypas, jj = 0; ipas > 0; ii += gypas, jj++, ipas-- )
{
msg.Empty(); msg << jj;
msg.Empty();
msg.Append('A' + jj);
if( ii < yg - PAS_REF / 2 )
{
pos.x = ref.x * conv_unit; pos.y = ii * conv_unit;
......
/**********************************************************/
/**********************************************************/
/* wxwineda.cpp - fonctions des classes du type WinEDAxxxx */
/**********************************************************/
......@@ -29,10 +29,10 @@ WinEDA_EnterText::WinEDA_EnterText( wxWindow* parent,
BoxSizer->Add( m_Title, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE, 5 );
long style = 0;
if (Multiline)
style = wxTE_MULTILINE;
m_FrameText = new wxTextCtrl( parent, -1, TextToEdit, wxDefaultPosition, Size,style );
m_FrameText->SetInsertionPoint( 1 );
......@@ -410,15 +410,17 @@ void WinEDA_ValueCtrl::Enable( bool enbl )
/***************************************************************/
/* Classe pour afficher et editer une valeur en double flottant*/
/***************************************************************/
WinEDA_DFloatValueCtrl::WinEDA_DFloatValueCtrl( wxWindow* parent, const wxString& title,
double value, wxBoxSizer* BoxSizer )
WinEDA_DFloatValueCtrl::WinEDA_DFloatValueCtrl( wxWindow* parent,
const wxString& title,
double value,
wxBoxSizer* BoxSizer )
{
wxString buffer;
wxString label = title;
m_Value = value;
m_Text = new wxStaticText( parent, -1, label );
m_Text = new wxStaticText( parent, -1, label );
BoxSizer->Add( m_Text, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
......
......@@ -47,7 +47,8 @@ MODULE* WinEDA_DisplayFrame::Get_Module( const wxString& CmpName )
if( !tmp )
{
msg.Printf( _( "PCB foot print library file <%s> could not be found in the default search paths." ),
msg.Printf( _( "PCB foot print library file <%s> could not be \
found in the default search paths." ),
fn.GetFullName().c_str() );
wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR, this );
continue;
......
......@@ -173,9 +173,9 @@ static int SavePcbFormatAscii( WinEDA_GerberFrame* frame, FILE* aFile,
double b = atan2( track->m_End.y-cy, track->m_End.x-cx );
drawitem->m_Shape = S_ARC;
drawitem->m_Angle = fmod( (a-b)/M_PI*1800.0+3600.0, 3600.0 );
drawitem->m_Start.x = cx;
drawitem->m_Start.y = cy;
drawitem->m_Angle = (int)fmod( (a-b)/M_PI*1800.0+3600.0, 3600.0 );
drawitem->m_Start.x = (int)cx;
drawitem->m_Start.y = (int)cy;
}
pcb->Add( drawitem );
......
......@@ -327,7 +327,8 @@ void WinEDA_PcbFrame::DrawInfoPlace( wxDC* DC )
*/
{
int color, ii, jj;
int ox, oy, top_state, bottom_state;
int ox, oy;
BoardCell top_state, bottom_state;
GRSetDrawMode( DC, GR_COPY );
for( ii = 0; ii < Nrows; ii++ )
......
/* Bits caracterisant une cellule */
#define HOLE 0x00000001L /* a conducting hole, ou obstacle */
#define CELL_is_MODULE 2 /* autoplacement: occupe par un module */
#define CELL_is_EDGE 0x20 /* zone et autoplacement: cellule limitant un contour (Board, Zone) */
#define CELL_is_FRIEND 0x40 /* zone et autoplacement: cellule faisant partie du net */
#define CELL_is_ZONE 0x80 /* zone et autoplacement: cellule disponible */
#define HOLE (char)0x01 /* a conducting hole, ou obstacle */
#define CELL_is_MODULE (char)0x02 /* autoplacement: occupe par un module */
#define CELL_is_EDGE (char)0x20 /* zone et autoplacement: cellule limitant un contour (Board, Zone) */
#define CELL_is_FRIEND (char)0x40 /* zone et autoplacement: cellule faisant partie du net */
#define CELL_is_ZONE (char)0x80 /* zone et autoplacement: cellule disponible */
/* Bits Masques de presence d'obstacles pour autoroutage */
#define OCCUPE 1 /* autoroutage : obstacle pour pistes et vias */
#define VIA_IMPOSSIBLE 2 /* autoroutage : obsacle pour vias */
#define CURRENT_PAD 4
#define OCCUPE 1 /* autoroutage : obstacle pour pistes et vias */
#define VIA_IMPOSSIBLE 2 /* autoroutage : obsacle pour vias */
#define CURRENT_PAD 4
/* traces radiating outward from a hole to a side or corner */
#define HOLE_NORTH 0x00000002L /* upward */
#define HOLE_NORTHEAST 0x00000004L /* upward and right */
#define HOLE_EAST 0x00000008L /* to the right */
#define HOLE_SOUTHEAST 0x00000010L /* downward and right */
#define HOLE_SOUTH 0x00000020L /* downward */
#define HOLE_SOUTHWEST 0x00000040L /* downward and left */
#define HOLE_WEST 0x00000080L /* to the left */
#define HOLE_NORTHWEST 0x00000100L /* upward and left */
#define HOLE_NORTH 0x00000002L /* upward */
#define HOLE_NORTHEAST 0x00000004L /* upward and right */
#define HOLE_EAST 0x00000008L /* to the right */
#define HOLE_SOUTHEAST 0x00000010L /* downward and right */
#define HOLE_SOUTH 0x00000020L /* downward */
#define HOLE_SOUTHWEST 0x00000040L /* downward and left */
#define HOLE_WEST 0x00000080L /* to the left */
#define HOLE_NORTHWEST 0x00000100L /* upward and left */
/* straight lines through the center */
#define LINE_HORIZONTAL 0x00000002L /* left-to-right line */
#define LINE_VERTICAL 0x00000004L /* top-to-bottom line */
#define LINE_HORIZONTAL 0x00000002L /* left-to-right line */
#define LINE_VERTICAL 0x00000004L /* top-to-bottom line */
/* lines cutting across a corner, connecting adjacent sides */
#define CORNER_NORTHEAST 0x00000008L /* upper right corner */
#define CORNER_SOUTHEAST 0x00000010L /* lower right corner */
#define CORNER_SOUTHWEST 0x00000020L /* lower left corner */
#define CORNER_NORTHWEST 0x00000040L /* upper left corner */
#define CORNER_NORTHEAST 0x00000008L /* upper right corner */
#define CORNER_SOUTHEAST 0x00000010L /* lower right corner */
#define CORNER_SOUTHWEST 0x00000020L /* lower left corner */
#define CORNER_NORTHWEST 0x00000040L /* upper left corner */
/* diagonal lines through the center */
#define DIAG_NEtoSW 0x00000080L /* northeast to southwest */
#define DIAG_SEtoNW 0x00000100L /* southeast to northwest */
#define DIAG_NEtoSW 0x00000080L /* northeast to southwest */
#define DIAG_SEtoNW 0x00000100L /* southeast to northwest */
/* 135 degree angle side-to-far-corner lines */
#define BENT_NtoSE 0x00000200L /* north to southeast */
#define BENT_NtoSW 0x00000400L /* north to southwest */
#define BENT_EtoSW 0x00000800L /* east to southwest */
#define BENT_EtoNW 0x00001000L /* east to northwest */
#define BENT_StoNW 0x00002000L /* south to northwest */
#define BENT_StoNE 0x00004000L /* south to northeast */
#define BENT_WtoNE 0x00008000L /* west to northeast */
#define BENT_WtoSE 0x00010000L /* west to southeast */
#define BENT_NtoSE 0x00000200L /* north to southeast */
#define BENT_NtoSW 0x00000400L /* north to southwest */
#define BENT_EtoSW 0x00000800L /* east to southwest */
#define BENT_EtoNW 0x00001000L /* east to northwest */
#define BENT_StoNW 0x00002000L /* south to northwest */
#define BENT_StoNE 0x00004000L /* south to northeast */
#define BENT_WtoNE 0x00008000L /* west to northeast */
#define BENT_WtoSE 0x00010000L /* west to southeast */
/* 90 degree corner-to-adjacent-corner lines */
#define ANGLE_NEtoSE 0x00020000L /* northeast to southeast */
#define ANGLE_SEtoSW 0x00040000L /* southeast to southwest */
#define ANGLE_SWtoNW 0x00080000L /* southwest to northwest */
#define ANGLE_NWtoNE 0x00100000L /* northwest to northeast */
#define ANGLE_NEtoSE 0x00020000L /* northeast to southeast */
#define ANGLE_SEtoSW 0x00040000L /* southeast to southwest */
#define ANGLE_SWtoNW 0x00080000L /* southwest to northwest */
#define ANGLE_NWtoNE 0x00100000L /* northwest to northeast */
/* 45 degree angle side-to-near-corner lines */
#define SHARP_NtoNE 0x00200000L /* north to northeast */
#define SHARP_EtoNE 0x00400000L /* east to northeast */
#define SHARP_EtoSE 0x00800000L /* east to southeast */
#define SHARP_StoSE 0x01000000L /* south to southeast */
#define SHARP_StoSW 0x02000000L /* south to southwest */
#define SHARP_WtoSW 0x04000000L /* west to southwest */
#define SHARP_WtoNW 0x08000000L /* west to northwest */
#define SHARP_NtoNW 0x10000000L /* north to northwest */
#define SHARP_NtoNE 0x00200000L /* north to northeast */
#define SHARP_EtoNE 0x00400000L /* east to northeast */
#define SHARP_EtoSE 0x00800000L /* east to southeast */
#define SHARP_StoSE 0x01000000L /* south to southeast */
#define SHARP_StoSW 0x02000000L /* south to southwest */
#define SHARP_WtoSW 0x04000000L /* west to southwest */
#define SHARP_WtoNW 0x08000000L /* west to northwest */
#define SHARP_NtoNW 0x10000000L /* north to northwest */
/* directions the cell can be reached from (point to previous cell) */
#define FROM_NOWHERE 0
#define FROM_NORTH 1
#define FROM_NORTHEAST 2
#define FROM_EAST 3
#define FROM_SOUTHEAST 4
#define FROM_SOUTH 5
#define FROM_SOUTHWEST 6
#define FROM_WEST 7
#define FROM_NORTHWEST 8
#define FROM_OTHERSIDE 9
#define FROM_NOWHERE 0
#define FROM_NORTH 1
#define FROM_NORTHEAST 2
#define FROM_EAST 3
#define FROM_SOUTHEAST 4
#define FROM_SOUTH 5
#define FROM_SOUTHWEST 6
#define FROM_WEST 7
#define FROM_NORTHWEST 8
#define FROM_OTHERSIDE 9
This diff is collapsed.
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