Commit d3afe95c authored by Dick Hollenbeck's avatar Dick Hollenbeck

remove page size globals from eeschema

parent 697f9123
......@@ -22,8 +22,8 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
option(USE_PNG_BITMAPS "use PNG bitmaps instead of XPM (default ON)" ON)
option(USE_NEW_PCBNEW_LOAD "use new plugin support for legacy file format (default OFF)" OFF)
option(USE_NEW_PCBNEW_SAVE "use new plugin support for legacy file format (default OFF)" OFF)
option(USE_NEW_PCBNEW_LOAD "use new plugin support for legacy file format (default ON)" ON)
option(USE_NEW_PCBNEW_SAVE "use new plugin support for legacy file format (default ON)" ON)
# Russian GOST patch
option(wxUSE_UNICODE "enable/disable building unicode (default OFF)")
......@@ -265,6 +265,11 @@ add_subdirectory(bitmap2component)
add_subdirectory(pcb_calculator)
#add_subdirectory(new)
add_executable( container_test EXCLUDE_FROM_ALL container_test.cpp )
target_link_libraries( container_test common polygon bitmaps ${wxWidgets_LIBRARIES} )
#############
# Resources #
#############
......
......@@ -178,24 +178,24 @@ bool EnsureTextCtrlWidth( wxTextCtrl* aCtrl, const wxString* aString )
// Standard page sizes in 1/1000 inch
#if defined(KICAD_GOST)
static const PAGE_INFO pageA4( wxSize( 8283, 11700 ), wxPoint( 0, 0 ), wxT( "A4" ) );
static const PAGE_INFO pageA4( wxSize( 8283, 11700 ), wxT( "A4" ) );
#else
static const PAGE_INFO pageA4( wxSize( 11700, 8267 ), wxPoint( 0, 0 ), wxT( "A4" ) );
static const PAGE_INFO pageA4( wxSize( 11700, 8267 ), wxT( "A4" ) );
#endif
static const PAGE_INFO pageA3( wxSize( 16535, 11700 ), wxPoint( 0, 0 ), wxT( "A3" ) );
static const PAGE_INFO pageA2( wxSize( 23400, 16535 ), wxPoint( 0, 0 ), wxT( "A2" ) );
static const PAGE_INFO pageA1( wxSize( 33070, 23400 ), wxPoint( 0, 0 ), wxT( "A1" ) );
static const PAGE_INFO pageA0( wxSize( 46800, 33070 ), wxPoint( 0, 0 ), wxT( "A0" ) );
static const PAGE_INFO pageA( wxSize( 11000, 8500 ), wxPoint( 0, 0 ), wxT( "A" ) );
static const PAGE_INFO pageB( wxSize( 17000, 11000 ), wxPoint( 0, 0 ), wxT( "B" ) );
static const PAGE_INFO pageC( wxSize( 22000, 17000 ), wxPoint( 0, 0 ), wxT( "C" ) );
static const PAGE_INFO pageD( wxSize( 34000, 22000 ), wxPoint( 0, 0 ), wxT( "D" ) );
static const PAGE_INFO pageE( wxSize( 44000, 34000 ), wxPoint( 0, 0 ), wxT( "E" ) );
static const PAGE_INFO pageGERBER(wxSize( 32000, 32000 ), wxPoint( 0, 0 ), wxT( "GERBER" ) );
static const PAGE_INFO pageA3( wxSize( 16535, 11700 ), wxT( "A3" ) );
static const PAGE_INFO pageA2( wxSize( 23400, 16535 ), wxT( "A2" ) );
static const PAGE_INFO pageA1( wxSize( 33070, 23400 ), wxT( "A1" ) );
static const PAGE_INFO pageA0( wxSize( 46800, 33070 ), wxT( "A0" ) );
static const PAGE_INFO pageA( wxSize( 11000, 8500 ), wxT( "A" ) );
static const PAGE_INFO pageB( wxSize( 17000, 11000 ), wxT( "B" ) );
static const PAGE_INFO pageC( wxSize( 22000, 17000 ), wxT( "C" ) );
static const PAGE_INFO pageD( wxSize( 34000, 22000 ), wxT( "D" ) );
static const PAGE_INFO pageE( wxSize( 44000, 34000 ), wxT( "E" ) );
static const PAGE_INFO pageGERBER(wxSize( 32000, 32000 ), wxT( "GERBER" ) );
double PAGE_INFO::s_user_width = 17.0;
double PAGE_INFO::s_user_height = 11.0;
static const PAGE_INFO pageUser( wxSize( 17000, 11000 ), wxPoint( 0, 0 ), wxT( "User" ) );
static const PAGE_INFO pageUser( wxSize( 17000, 11000 ), wxT( "User" ) );
static const PAGE_INFO* stdPageSizes[] = {
&pageA4,
......@@ -263,13 +263,12 @@ bool PAGE_INFO::SetType( const wxString& aType )
}
PAGE_INFO::PAGE_INFO( const wxSize& aSizeMils, const wxPoint& aOffsetMils, const wxString& aType )
PAGE_INFO::PAGE_INFO( const wxSize& aSizeMils, const wxString& aType )
{
// aSizeMils is in 1/1000th of an inch
SetWidthInches( aSizeMils.x / 1000.0 );
SetHeightInches( aSizeMils.y / 1000.0 );
m_Offset = aOffsetMils;
m_Type = aType;
// Adjust the default value for margins to 400 mils (0,4 inch or 10 mm)
......
......@@ -87,7 +87,7 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( CVPCB_MAINFRAME* father,
SetIcon( icon );
SetBoard( new BOARD() );
SetScreen( new PCB_SCREEN( GetPageSettings().GetSizeIU() ) );
SetScreen( new PCB_SCREEN( GetPageSizeIU() ) );
LoadSettings();
......
......@@ -119,7 +119,7 @@ void FOOTPRINTS_LISTBOX::SetFootprintFullList( FOOTPRINT_LIST& list )
for( unsigned ii = 0; ii < list.GetCount(); ii++ )
{
FOOTPRINT_INFO & footprint = list.GetItem(ii);
msg.Printf( wxT( "%3d %s" ), m_FullFootprintList.GetCount() + 1,
msg.Printf( wxT( "%3d %s" ), (int) m_FullFootprintList.GetCount() + 1,
GetChars(footprint.m_Module) );
m_FullFootprintList.Add( msg );
}
......
......@@ -605,7 +605,7 @@ void CVPCB_MAINFRAME::DisplayStatus()
{
wxString msg;
msg.Printf( _( "Components: %d (free: %d)" ), m_components.size(), m_undefinedComponentCnt );
msg.Printf( _( "Components: %d (free: %d)" ), (int) m_components.size(), m_undefinedComponentCnt );
SetStatusText( msg, 0 );
SetStatusText( wxEmptyString, 1 );
......@@ -614,10 +614,10 @@ void CVPCB_MAINFRAME::DisplayStatus()
{
if( m_FootprintList->m_UseFootprintFullList )
msg.Printf( _( "Footprints (All): %d" ),
m_FootprintList->m_ActiveFootprintList->GetCount() );
(int) m_FootprintList->m_ActiveFootprintList->GetCount() );
else
msg.Printf( _( "Footprints (filtered): %d" ),
m_FootprintList->m_ActiveFootprintList->GetCount() );
(int) m_FootprintList->m_ActiveFootprintList->GetCount() );
}
else
{
......
......@@ -199,7 +199,7 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame,
{
int tmpzoom;
wxPoint tmp_startvisu;
wxSize SheetSize; // Sheet size in internal units
wxSize sheetSize; // Sheet size in internal units
wxPoint old_org;
bool success = true;
......@@ -209,16 +209,15 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame,
screen->m_DrawOrg.x = screen->m_DrawOrg.y = 0;
screen->m_StartVisu.x = screen->m_StartVisu.y = 0;
SheetSize = screen->ReturnPageSize(); // page size in 1/1000 inch, ie in internal units
sheetSize = screen->GetPageSettings().GetSizeIU(); // page size in 1/1000 inch, ie in internal units
screen->SetScalingFactor( 1.0 );
EDA_DRAW_PANEL* panel = frame->GetCanvas();
SetLocaleTo_C_standard(); // Switch the locale to standard C (needed
// to print floating point numbers like 1.3)
LOCALE_IO toggle;
float dpi = (float) frame->GetInternalUnits();
wxSVGFileDC dc( FullFileName, SheetSize.x, SheetSize.y, dpi );
wxSVGFileDC dc( FullFileName, sheetSize.x, sheetSize.y, dpi );
EDA_RECT tmp = panel->m_ClipBox;
GRResetPenAndBrush( &dc );
......@@ -236,7 +235,6 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame,
if( aPrint_Sheet_Ref )
frame->TraceWorkSheet( &dc, screen, g_DrawDefaultLineThickness );
SetLocaleTo_Default(); // revert to the current locale
screen->m_IsPrinting = false;
panel->m_ClipBox = tmp;
......
......@@ -63,11 +63,11 @@ private:
void initDlg();
void initOptVars();
void CreateDXFFile();
void PlotOneSheetDXF( const wxString& FileName,
SCH_SCREEN* screen, PAGE_INFO* sheet,
void PlotOneSheetDXF( const wxString& FileName, SCH_SCREEN* screen,
wxPoint plot_offset, double scale );
};
/* static members (static to remember last state): */
// static members (static to remember last state):
bool DIALOG_PLOT_SCHEMATIC_DXF::m_plotColorOpt = false;
bool DIALOG_PLOT_SCHEMATIC_DXF::m_plot_Sheet_Ref = true;
......@@ -147,8 +147,7 @@ void DIALOG_PLOT_SCHEMATIC_DXF::CreateDXFFile( )
SCH_SCREEN* screen = schframe->GetScreen();
SCH_SHEET_PATH* sheetpath;
SCH_SHEET_PATH oldsheetpath = schframe->GetCurrentSheet();
wxString PlotFileName;
PAGE_INFO* PlotSheet;
wxString plotFileName;
wxPoint plot_offset;
/* When printing all pages, the printed page is not the current page.
......@@ -186,15 +185,14 @@ void DIALOG_PLOT_SCHEMATIC_DXF::CreateDXFFile( )
sheetpath = SheetList.GetNext();
}
PlotSheet = screen->m_CurrentSheetDesc;
double scale = 10;
plot_offset.x = 0;
plot_offset.y = 0;
PlotFileName = schframe->GetUniqueFilenameForCurrentSheet() + wxT( ".dxf" );
plotFileName = schframe->GetUniqueFilenameForCurrentSheet() + wxT( ".dxf" );
PlotOneSheetDXF( PlotFileName, screen, PlotSheet, plot_offset, scale );
PlotOneSheetDXF( plotFileName, screen, plot_offset, scale );
if( !m_select_PlotAll )
break;
......@@ -206,14 +204,14 @@ void DIALOG_PLOT_SCHEMATIC_DXF::CreateDXFFile( )
}
void DIALOG_PLOT_SCHEMATIC_DXF::PlotOneSheetDXF( const wxString& FileName,
SCH_SCREEN* screen,
PAGE_INFO* sheet,
wxPoint plot_offset,
double scale )
void DIALOG_PLOT_SCHEMATIC_DXF::PlotOneSheetDXF( const wxString& FileName,
SCH_SCREEN* screen,
wxPoint plot_offset,
double scale )
{
wxString msg;
wxString msg;
FILE* output_file = wxFopen( FileName, wxT( "wt" ) );
if( output_file == NULL )
......@@ -227,13 +225,17 @@ void DIALOG_PLOT_SCHEMATIC_DXF::PlotOneSheetDXF( const wxString& FileName,
msg.Printf( _( "Plot: %s " ), GetChars( FileName ) );
m_MsgBox->AppendText( msg );
SetLocaleTo_C_standard();
LOCALE_IO toggle;
DXF_PLOTTER* plotter = new DXF_PLOTTER();
plotter->set_paper_size( sheet );
const PAGE_INFO& pageInfo = screen->GetPageSettings();
plotter->SetPageSettings( pageInfo );
plotter->set_viewport( plot_offset, scale, 0 );
plotter->set_color_mode( m_plotColorOpt );
/* Init : */
// Init :
plotter->set_creator( wxT( "Eeschema-DXF" ) );
plotter->set_filename( FileName );
plotter->start_plot( output_file );
......@@ -246,10 +248,9 @@ void DIALOG_PLOT_SCHEMATIC_DXF::PlotOneSheetDXF( const wxString& FileName,
screen->Plot( plotter );
/* fin */
// finish
plotter->end_plot();
delete plotter;
SetLocaleTo_Default();
m_MsgBox->AppendText( wxT( "Ok\n" ) );
}
......@@ -70,12 +70,13 @@ private:
void initOptVars();
void createPSFile();
void plotOneSheetPS( const wxString& FileName,
SCH_SCREEN* screen, PAGE_INFO* sheet,
SCH_SCREEN* screen, const PAGE_INFO& pageInfo,
wxPoint plot_offset, double scale );
};
/* static members (static to remember last state): */
// static members (static to remember last state):
bool DIALOG_PLOT_SCHEMATIC_PS::m_plotColorOpt = false;
int DIALOG_PLOT_SCHEMATIC_PS:: m_pageSizeSelect = PAGE_SIZE_AUTO;
int DIALOG_PLOT_SCHEMATIC_PS::m_pageSizeSelect = PAGE_SIZE_AUTO;
bool DIALOG_PLOT_SCHEMATIC_PS::m_plot_Sheet_Ref = true;
......@@ -172,13 +173,13 @@ void DIALOG_PLOT_SCHEMATIC_PS::initOptVars()
void DIALOG_PLOT_SCHEMATIC_PS::createPSFile()
{
SCH_SCREEN* screen = m_Parent->GetScreen();
SCH_SHEET_PATH* sheetpath;
SCH_SHEET_PATH oldsheetpath = m_Parent->GetCurrentSheet(); // sheetpath is saved here
wxString plotFileName;
PAGE_INFO* actualPage; // page size selected in schematic
PAGE_INFO* plotPage; // page size selected to plot
wxPoint plot_offset;
SCH_SCREEN* screen = m_Parent->GetScreen();
SCH_SHEET_PATH* sheetpath;
SCH_SHEET_PATH oldsheetpath = m_Parent->GetCurrentSheet(); // sheetpath is saved here
wxString plotFileName;
PAGE_INFO actualPage; // page size selected in schematic
PAGE_INFO plotPage; // page size selected to plot
wxPoint plot_offset;
/* When printing all pages, the printed page is not the current page.
* In complex hierarchies, we must update component references
......@@ -213,16 +214,16 @@ void DIALOG_PLOT_SCHEMATIC_PS::createPSFile()
sheetpath = SheetList.GetNext();
}
actualPage = screen->m_CurrentSheetDesc;
actualPage = screen->GetPageSettings();
switch( m_pageSizeSelect )
{
case PAGE_SIZE_A:
plotPage = &g_Sheet_A;
plotPage.SetType( wxT( "A" ) );
break;
case PAGE_SIZE_A4:
plotPage = &g_Sheet_A4;
plotPage.SetType( wxT( "A4" ) );
break;
case PAGE_SIZE_AUTO:
......@@ -231,8 +232,9 @@ void DIALOG_PLOT_SCHEMATIC_PS::createPSFile()
break;
}
double scalex = (double) plotPage->m_Size.x / actualPage->m_Size.x;
double scaley = (double) plotPage->m_Size.y / actualPage->m_Size.y;
double scalex = (double) plotPage.GetWidthMils() / actualPage.GetWidthMils();
double scaley = (double) plotPage.GetHeightMils() / actualPage.GetHeightMils();
double scale = 10 * MIN( scalex, scaley );
plot_offset.x = 0;
......@@ -252,11 +254,11 @@ void DIALOG_PLOT_SCHEMATIC_PS::createPSFile()
}
void DIALOG_PLOT_SCHEMATIC_PS::plotOneSheetPS( const wxString& FileName,
SCH_SCREEN* screen,
PAGE_INFO* sheet,
wxPoint plot_offset,
double scale )
void DIALOG_PLOT_SCHEMATIC_PS::plotOneSheetPS( const wxString& FileName,
SCH_SCREEN* screen,
const PAGE_INFO& pageInfo,
wxPoint plot_offset,
double scale )
{
wxString msg;
......@@ -276,12 +278,12 @@ void DIALOG_PLOT_SCHEMATIC_PS::plotOneSheetPS( const wxString& FileName,
m_MsgBox->AppendText( msg );
PS_PLOTTER* plotter = new PS_PLOTTER();
plotter->set_paper_size( sheet );
plotter->SetPageSettings( pageInfo );
plotter->set_viewport( plot_offset, scale, 0 );
plotter->set_default_line_width( g_DrawDefaultLineThickness );
plotter->set_color_mode( m_plotColorOpt );
/* Init : */
// Init :
plotter->set_creator( wxT( "Eeschema-PS" ) );
plotter->set_filename( FileName );
plotter->start_plot( output_file );
......
......@@ -620,7 +620,7 @@ void SCH_SCREEN::Draw( EDA_DRAW_PANEL* aCanvas, wxDC* aDC, int aDrawMode, int aC
void SCH_SCREEN::Plot( PLOTTER* aPlotter )
{
for( SCH_ITEM* item = GetDrawItems(); item != NULL; item = item->Next() )
for( SCH_ITEM* item = GetDrawItems(); item; item = item->Next() )
{
aPlotter->set_current_line_width( item->GetPenSize() );
item->Plot( aPlotter );
......
......@@ -64,8 +64,8 @@ class SCH_SCREEN : public BASE_SCREEN
int m_refCount; ///< Number of sheets referencing this screen.
///< Delete when it goes to zero.
/// The size of the paper to print or plot on
PAGE_INFO m_paper; // keep with the MVC model as this class gets split
/// The size of the paper to print or plot on
PAGE_INFO m_paper; // keep with the MVC 'model' as this class gets split
SCH_ITEM* m_drawList; ///< Object list for the screen.
/// @todo use DLIST<SCH_ITEM> or superior container
......
......@@ -44,13 +44,13 @@ class BASE_SCREEN;
class EDA_DRAW_FRAME;
class EDA_DRAW_PANEL;
/* Flag for special keys */
// Flag for special keys
#define GR_KB_RIGHTSHIFT 0x10000000 /* Keybd states: right
* shift key depressed */
#define GR_KB_LEFTSHIFT 0x20000000 /* left shift key depressed
*/
#define GR_KB_CTRL 0x40000000 /* CTRL depressed */
#define GR_KB_ALT 0x80000000 /* ALT depressed */
#define GR_KB_CTRL 0x40000000 // CTRL depressed
#define GR_KB_ALT 0x80000000 // ALT depressed
#define GR_KB_SHIFT (GR_KB_LEFTSHIFT | GR_KB_RIGHTSHIFT)
#define GR_KB_SHIFTCTRL (GR_KB_SHIFT | GR_KB_CTRL)
#define MOUSE_MIDDLE 0x08000000 /* Middle button mouse
......@@ -74,7 +74,7 @@ enum pseudokeys {
#define ESC 27
/* TODO Executable names TODO*/
// TODO Executable names TODO
#ifdef __WINDOWS__
#define CVPCB_EXE wxT( "cvpcb.exe" )
#define PCBNEW_EXE wxT( "pcbnew.exe" )
......@@ -101,7 +101,7 @@ enum pseudokeys {
#endif
/* Graphic Texts Orientation in 0.1 degree*/
// Graphic Texts Orientation in 0.1 degree
#define TEXT_ORIENT_HORIZ 0
#define TEXT_ORIENT_VERT 900
......@@ -116,13 +116,13 @@ enum EDA_UNITS_T {
};
#if defined(KICAD_GOST)
#define GOST_LEFTMARGIN 800 /* 20mm */
#define GOST_RIGHTMARGIN 200 /* 5mm */
#define GOST_TOPMARGIN 200 /* 5mm */
#define GOST_BOTTOMMARGIN 200 /* 5mm */
#define GOST_LEFTMARGIN 800 // 20mm
#define GOST_RIGHTMARGIN 200 // 5mm
#define GOST_TOPMARGIN 200 // 5mm
#define GOST_BOTTOMMARGIN 200 // 5mm
#endif
/* forward declarations: */
// forward declarations:
class LibNameList;
......@@ -131,9 +131,8 @@ class PAGE_INFO;
/**
* Class PAGE_INFO
* describes the page size and margins of a paper page on which to
* eventually print or plot. Since paper is often described in inches,
* (and due to legacy code), inches, mils, and internal units (IU) are supported
* in the accessors. Again, we are describing paper in this class.
* eventually print or plot. Here paper is described in inches, but
* accessors for mils, and internal units (IU) are supported.
*
* @author Dick Hollenbeck
*/
......@@ -141,7 +140,7 @@ class PAGE_INFO
{
public:
PAGE_INFO( const wxString& aType = wxT( "A3" ) );
PAGE_INFO( const wxSize& aSizeMils, const wxPoint& aOffsetMils, const wxString& aName );
PAGE_INFO( const wxSize& aSizeMils, const wxString& aName );
const wxString& GetType() const { return m_Type; }
......@@ -187,7 +186,7 @@ public:
const wxSize GetSizeIU() const { return wxSize( GetWidthIU(), GetHeightIU() ); }
#endif
wxPoint GetOffsetMils() const { return m_Offset; }
// wxPoint GetOffsetMils() const { return m_Offset; }
int GetLeftMarginMils() const { return m_LeftMargin; }
int GetRightMarginMils() const { return m_RightMargin; }
......@@ -218,7 +217,7 @@ private:
double m_widthInches;
double m_heightInches;
wxPoint m_Offset; ///< plot offset in 1/1000 inches
// wxPoint m_Offset; ///< plot offset in 1/1000 inches
int m_LeftMargin;
int m_RightMargin;
......@@ -232,10 +231,10 @@ private:
extern wxString g_ProductName;
/* Default user lib path can be left void, if the standard lib path is used */
/// Default user lib path can be left void, if the standard lib path is used
extern wxString g_UserLibDirBuffer;
extern bool g_ShowPageLimits; // true to display the page limits
extern bool g_ShowPageLimits; ///< true to display the page limits
/**
* File extension definitions. Please do not changes these. If a different
......@@ -263,10 +262,10 @@ extern const wxString MacrosFileWildcard;
extern const wxString AllFilesWildcard;
// Name of default configuration file. (kicad.pro)
/// Name of default configuration file. (kicad.pro)
extern wxString g_Prj_Default_Config_FullFilename;
// Name of local configuration file. (<curr projet>.pro)
/// Name of local configuration file. (<curr projet>.pro)
extern wxString g_Prj_Config_LocalFilename;
extern EDA_UNITS_T g_UserUnit; ///< display units
......@@ -275,7 +274,7 @@ extern EDA_UNITS_T g_UserUnit; ///< display units
extern int g_GhostColor;
/* COMMON.CPP */
// COMMON.CPP
/**
* Function SetLocaleTo_C_standard
......
......@@ -343,7 +343,7 @@ void DIALOG_PAD_PROPERTIES::initValues()
break;
}
msg.Printf( wxT( "%d" ), m_dummyPad->m_Orient );
msg.Printf( wxT( "%g" ), m_dummyPad->GetOrientation() );
m_PadOrientCtrl->SetValue( msg );
// Type of pad selection
......@@ -493,7 +493,7 @@ void DIALOG_PAD_PROPERTIES::PadOrientEvent( wxCommandEvent& event )
}
wxString msg;
msg.Printf( wxT( "%d" ), m_dummyPad->m_Orient );
msg.Printf( wxT( "%g" ), m_dummyPad->GetOrientation() );
m_PadOrientCtrl->SetValue( msg );
TransfertDataToPad( m_dummyPad );
......@@ -775,10 +775,11 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError
aPad->m_Offset.x = ReturnValueFromTextCtrl( *m_ShapeOffset_X_Ctrl, internalUnits );
aPad->m_Offset.y = ReturnValueFromTextCtrl( *m_ShapeOffset_Y_Ctrl, internalUnits );
long orient_value = 0;
double orient_value = 0;
msg = m_PadOrientCtrl->GetValue();
msg.ToLong( &orient_value );
aPad->m_Orient = orient_value;
msg.ToDouble( &orient_value );
aPad->SetOrientation( orient_value );
msg = m_PadNumCtrl->GetValue().Left( 4 );
aPad->SetPadName( msg );
......
......@@ -299,9 +299,10 @@ this file again." ) );
}
}
catch( IO_ERROR ioe )
{wxMessageBox("catch");
{
wxString msg = wxString::Format( _( "Error loading board.\n%s" ),
ioe.errorText.GetData() );
wxMessageBox( msg, _( "Open Board File" ), wxOK | wxICON_ERROR );
}
......
......@@ -367,7 +367,7 @@ wxString PCB_BASE_FRAME::Select_1_Module_From_List( EDA_DRAW_FRAME* aWindow,
if( footprint_names_list.GetCount() )
{
msg.Printf( _( "Modules [%d items]" ), footprint_names_list.GetCount() );
msg.Printf( _( "Modules [%d items]" ), (int) footprint_names_list.GetCount() );
EDA_LIST_DIALOG dlg( aWindow, msg, footprint_names_list, OldName,
DisplayCmpDoc, GetComponentDialogPosition() );
......
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