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 @@ ...@@ -19,7 +19,7 @@
#include "dialog_copper_zones.h" #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 * static to keep this pattern for an entire pcbnew session
*/ */
......
...@@ -67,15 +67,15 @@ private: ...@@ -67,15 +67,15 @@ private:
}; };
BEGIN_EVENT_TABLE( DIMENSION_EDITOR_DIALOG, wxDialog ) BEGIN_EVENT_TABLE( DIMENSION_EDITOR_DIALOG, wxDialog )
EVT_BUTTON( wxID_OK, DIMENSION_EDITOR_DIALOG::OnOkClick ) EVT_BUTTON( wxID_OK, DIMENSION_EDITOR_DIALOG::OnOkClick )
EVT_BUTTON( wxID_CANCEL, DIMENSION_EDITOR_DIALOG::OnCancelClick ) EVT_BUTTON( wxID_CANCEL, DIMENSION_EDITOR_DIALOG::OnCancelClick )
END_EVENT_TABLE() END_EVENT_TABLE()
DIMENSION_EDITOR_DIALOG::DIMENSION_EDITOR_DIALOG( WinEDA_PcbFrame* parent, DIMENSION_EDITOR_DIALOG::DIMENSION_EDITOR_DIALOG( WinEDA_PcbFrame* parent,
DIMENSION* Dimension, wxDC* DC DIMENSION* Dimension, wxDC* DC
) : ) :
wxDialog( parent, -1, _( "Dimension properties" ) ) wxDialog( parent, -1, wxString( _( "Dimension properties" ) ) )
{ {
wxButton* Button; wxButton* Button;
...@@ -163,15 +163,16 @@ void DIMENSION_EDITOR_DIALOG::OnOkClick( wxCommandEvent& event ) ...@@ -163,15 +163,16 @@ void DIMENSION_EDITOR_DIALOG::OnOkClick( wxCommandEvent& event )
CurrentDimension->m_Text->m_Size = m_TxtSizeCtrl->GetValue(); CurrentDimension->m_Text->m_Size = m_TxtSizeCtrl->GetValue();
int width = m_TxtWidthCtrl->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 ) 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; width = maxthickness;
} }
CurrentDimension->m_Text->m_Width = CurrentDimension->m_Width = width ; 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 ); CurrentDimension->SetLayer( m_SelLayerBox->GetChoice() + FIRST_NO_COPPER_LAYER );
......
...@@ -926,17 +926,17 @@ static void export_vrml_pad( BOARD* pcb, D_PAD* pad ) /*{{{*/ ...@@ -926,17 +926,17 @@ static void export_vrml_pad( BOARD* pcb, D_PAD* pad ) /*{{{*/
{ {
int coord[8] = int coord[8] =
{ {
-pad_w - pad_dy, +pad_h + pad_dx, wxRound(-pad_w - pad_dy), wxRound(+pad_h + pad_dx),
-pad_w + pad_dy, -pad_h - pad_dx, wxRound(-pad_w + pad_dy), wxRound(-pad_h - pad_dx),
+pad_w - pad_dy, +pad_h - pad_dx, wxRound(+pad_w - pad_dy), wxRound(+pad_h - pad_dx),
+pad_w + pad_dy, -pad_h + pad_dx, wxRound(+pad_w + pad_dy), wxRound(-pad_h + pad_dx),
}; };
for( int i = 0; i < 4; i++ ) for( int i = 0; i < 4; i++ )
{ {
RotatePoint( &coord[i * 2], &coord[i * 2 + 1], pad->m_Orient ); RotatePoint( &coord[i * 2], &coord[i * 2 + 1], pad->m_Orient );
coord[i * 2] += pad_x; coord[i * 2] += wxRound( pad_x );
coord[i * 2 + 1] += pad_y; coord[i * 2 + 1] += wxRound( pad_y );
} }
bag_flat_quad( layer, coord[0], coord[1], bag_flat_quad( layer, coord[0], coord[1],
...@@ -1054,7 +1054,7 @@ static void export_vrml_module( BOARD* aPcb, MODULE* aModule, ...@@ -1054,7 +1054,7 @@ static void export_vrml_module( BOARD* aPcb, MODULE* aModule,
* for footprints that are flipped * for footprints that are flipped
* When flipped, axis rotation is the horizontal axis (X axis) * 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 ) if ( isFlipped )
rotx += 1800; rotx += 1800;
......
...@@ -42,9 +42,8 @@ private: ...@@ -42,9 +42,8 @@ private:
WinEDA_ValueCtrl* m_MireSizeCtrl; WinEDA_ValueCtrl* m_MireSizeCtrl;
wxRadioBox* m_MireShape; wxRadioBox* m_MireShape;
public: TARGET_PROPERTIES_DIALOG_EDITOR( WinEDA_PcbFrame* parent, public:
MIREPCB* Mire, TARGET_PROPERTIES_DIALOG_EDITOR( WinEDA_PcbFrame* parent, MIREPCB* Mire, wxDC* DC );
wxDC* DC );
~TARGET_PROPERTIES_DIALOG_EDITOR() { } ~TARGET_PROPERTIES_DIALOG_EDITOR() { }
private: private:
...@@ -73,7 +72,7 @@ void WinEDA_PcbFrame::InstallMireOptionsFrame( MIREPCB* MirePcb, wxDC* DC ) ...@@ -73,7 +72,7 @@ void WinEDA_PcbFrame::InstallMireOptionsFrame( MIREPCB* MirePcb, wxDC* DC )
TARGET_PROPERTIES_DIALOG_EDITOR::TARGET_PROPERTIES_DIALOG_EDITOR( TARGET_PROPERTIES_DIALOG_EDITOR::TARGET_PROPERTIES_DIALOG_EDITOR(
WinEDA_PcbFrame* parent, WinEDA_PcbFrame* parent,
MIREPCB* Mire, wxDC* DC ) : MIREPCB* Mire, wxDC* DC ) :
wxDialog( parent, wxID_ANY, _( "Target Properties" ) ) wxDialog( parent, wxID_ANY, wxString( _( "Target Properties" ) ) )
{ {
wxString number; wxString number;
wxButton* Button; wxButton* Button;
...@@ -124,8 +123,7 @@ TARGET_PROPERTIES_DIALOG_EDITOR::TARGET_PROPERTIES_DIALOG_EDITOR( ...@@ -124,8 +123,7 @@ TARGET_PROPERTIES_DIALOG_EDITOR::TARGET_PROPERTIES_DIALOG_EDITOR(
} }
void TARGET_PROPERTIES_DIALOG_EDITOR::OnCancelClick( wxCommandEvent& WXUNUSED( void TARGET_PROPERTIES_DIALOG_EDITOR::OnCancelClick( wxCommandEvent& WXUNUSED( event ) )
event ) )
{ {
EndModal( -1 ); 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