Commit 80bc0ad6 authored by Wayne Stambaugh's avatar Wayne Stambaugh

Minor build and compiler warning fixes.

* Fix build errors for ambiguous wxDialog constructor using gcc 3.4.5 on
  MinGW/MSYS.
* Fix compiler warnings in VRML export.
parent 492c75bd
......@@ -19,7 +19,7 @@
#include "dialog_copper_zones.h"
wxString dialog_copper_zone::m_netNameShowFilter("*"); /* the filter to show nets (default * "*").
wxString dialog_copper_zone::m_netNameShowFilter( wxT( "*" ) ); /* the filter to show nets (default * "*").
* static to keep this pattern for an entire pcbnew session
*/
......
......@@ -17,9 +17,9 @@ static void Montre_Position_New_Dimension( WinEDA_DrawPanel* panel, wxDC* DC, bo
/* Local variables : */
static int status_dimension; /* Used in cimension creation:
* = 0 : initial value: no dimension in progress
* = 1 : First point created
* = 2 : Secont point created, the text must be placed */
* = 0 : initial value: no dimension in progress
* = 1 : First point created
* = 2 : Secont point created, the text must be placed */
/*
* A dimension has this shape:
......@@ -53,7 +53,7 @@ public:
// Constructor and destructor
DIMENSION_EDITOR_DIALOG( WinEDA_PcbFrame* parent,
DIMENSION* Dimension, wxDC* DC );
DIMENSION* Dimension, wxDC* DC );
~DIMENSION_EDITOR_DIALOG()
{
}
......@@ -67,15 +67,15 @@ private:
};
BEGIN_EVENT_TABLE( DIMENSION_EDITOR_DIALOG, wxDialog )
EVT_BUTTON( wxID_OK, DIMENSION_EDITOR_DIALOG::OnOkClick )
EVT_BUTTON( wxID_CANCEL, DIMENSION_EDITOR_DIALOG::OnCancelClick )
EVT_BUTTON( wxID_OK, DIMENSION_EDITOR_DIALOG::OnOkClick )
EVT_BUTTON( wxID_CANCEL, DIMENSION_EDITOR_DIALOG::OnCancelClick )
END_EVENT_TABLE()
DIMENSION_EDITOR_DIALOG::DIMENSION_EDITOR_DIALOG( WinEDA_PcbFrame* parent,
DIMENSION* Dimension, wxDC* DC
) :
wxDialog( parent, -1, _( "Dimension properties" ) )
wxDialog( parent, -1, wxString( _( "Dimension properties" ) ) )
{
wxButton* Button;
......@@ -108,8 +108,8 @@ DIMENSION_EDITOR_DIALOG::DIMENSION_EDITOR_DIALOG( WinEDA_PcbFrame* parent,
RightBoxSizer->Add( m_Mirror, 0, wxGROW | wxALL, 5 );
m_Name = new WinEDA_EnterText( this, wxT( "Text:" ),
Dimension->m_Text->m_Text,
LeftBoxSizer, wxSize( 200, -1 ) );
Dimension->m_Text->m_Text,
LeftBoxSizer, wxSize( 200, -1 ) );
m_TxtSizeCtrl = new WinEDA_SizeCtrl( this, _( "Size" ),
Dimension->m_Text->m_Size,
......@@ -163,15 +163,16 @@ void DIMENSION_EDITOR_DIALOG::OnOkClick( wxCommandEvent& event )
CurrentDimension->m_Text->m_Size = m_TxtSizeCtrl->GetValue();
int width = m_TxtWidthCtrl->GetValue();
int maxthickness = Clamp_Text_PenSize(width, CurrentDimension->m_Text->m_Size );
int maxthickness = Clamp_Text_PenSize( width, CurrentDimension->m_Text->m_Size );
if( width > maxthickness )
{
DisplayError(NULL, _("The text thickness is too large for the text size. It will be clamped"));
DisplayError( NULL,
_( "The text thickness is too large for the text size. It will be clamped") );
width = maxthickness;
}
CurrentDimension->m_Text->m_Width = CurrentDimension->m_Width = width ;
CurrentDimension->m_Text->m_Mirror = (m_Mirror->GetSelection() == 1) ? true : false;
CurrentDimension->m_Text->m_Mirror = ( m_Mirror->GetSelection() == 1 ) ? true : false;
CurrentDimension->SetLayer( m_SelLayerBox->GetChoice() + FIRST_NO_COPPER_LAYER );
......
......@@ -926,17 +926,17 @@ static void export_vrml_pad( BOARD* pcb, D_PAD* pad ) /*{{{*/
{
int coord[8] =
{
-pad_w - pad_dy, +pad_h + pad_dx,
-pad_w + pad_dy, -pad_h - pad_dx,
+pad_w - pad_dy, +pad_h - pad_dx,
+pad_w + pad_dy, -pad_h + pad_dx,
wxRound(-pad_w - pad_dy), wxRound(+pad_h + pad_dx),
wxRound(-pad_w + pad_dy), wxRound(-pad_h - pad_dx),
wxRound(+pad_w - pad_dy), wxRound(+pad_h - pad_dx),
wxRound(+pad_w + pad_dy), wxRound(-pad_h + pad_dx),
};
for( int i = 0; i < 4; i++ )
{
RotatePoint( &coord[i * 2], &coord[i * 2 + 1], pad->m_Orient );
coord[i * 2] += pad_x;
coord[i * 2 + 1] += pad_y;
coord[i * 2] += wxRound( pad_x );
coord[i * 2 + 1] += wxRound( pad_y );
}
bag_flat_quad( layer, coord[0], coord[1],
......@@ -1054,7 +1054,7 @@ static void export_vrml_module( BOARD* aPcb, MODULE* aModule,
* for footprints that are flipped
* When flipped, axis rotation is the horizontal axis (X axis)
*/
int rotx = vrmlm->m_MatRotation.x;
int rotx = wxRound( vrmlm->m_MatRotation.x );
if ( isFlipped )
rotx += 1800;
......
......@@ -42,9 +42,8 @@ private:
WinEDA_ValueCtrl* m_MireSizeCtrl;
wxRadioBox* m_MireShape;
public: TARGET_PROPERTIES_DIALOG_EDITOR( WinEDA_PcbFrame* parent,
MIREPCB* Mire,
wxDC* DC );
public:
TARGET_PROPERTIES_DIALOG_EDITOR( WinEDA_PcbFrame* parent, MIREPCB* Mire, wxDC* DC );
~TARGET_PROPERTIES_DIALOG_EDITOR() { }
private:
......@@ -73,7 +72,7 @@ void WinEDA_PcbFrame::InstallMireOptionsFrame( MIREPCB* MirePcb, wxDC* DC )
TARGET_PROPERTIES_DIALOG_EDITOR::TARGET_PROPERTIES_DIALOG_EDITOR(
WinEDA_PcbFrame* parent,
MIREPCB* Mire, wxDC* DC ) :
wxDialog( parent, wxID_ANY, _( "Target Properties" ) )
wxDialog( parent, wxID_ANY, wxString( _( "Target Properties" ) ) )
{
wxString number;
wxButton* Button;
......@@ -124,8 +123,7 @@ TARGET_PROPERTIES_DIALOG_EDITOR::TARGET_PROPERTIES_DIALOG_EDITOR(
}
void TARGET_PROPERTIES_DIALOG_EDITOR::OnCancelClick( wxCommandEvent& WXUNUSED(
event ) )
void TARGET_PROPERTIES_DIALOG_EDITOR::OnCancelClick( wxCommandEvent& WXUNUSED( event ) )
{
EndModal( -1 );
}
......
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