From d337d340eec14247f087375e143c162d8e835d6a Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 22 Dec 2013 20:02:04 +0100 Subject: [PATCH] Fix broken download_boost.cmake. Fix minor other issues: dialog fp lib table display not updated (Windows specific) when an option is changed from the lib table option editor overloaded function in dialog_fp_lib_table.cpp not compiled with gcc 4.4.7 (try to fix Bug #1262002). specctra_export.cpp: set min dist to find segment ends when building the board outline to 2 microns (should break anything, but should be enough to fix rounding issues when creating/importing board outlines with arcs) --- CMakeModules/download_boost.cmake | 11 +++++++---- pcbnew/dialogs/dialog_fp_lib_table.cpp | 8 +++++++- pcbnew/dialogs/dialog_fp_lib_table_base.cpp | 6 +++--- pcbnew/dialogs/dialog_fp_lib_table_base.fbp | 4 +++- pcbnew/dialogs/dialog_fp_lib_table_base.h | 4 ++-- pcbnew/specctra_export.cpp | 5 +++-- 6 files changed, 25 insertions(+), 13 deletions(-) diff --git a/CMakeModules/download_boost.cmake b/CMakeModules/download_boost.cmake index 74d0b766d4..12aa350267 100644 --- a/CMakeModules/download_boost.cmake +++ b/CMakeModules/download_boost.cmake @@ -113,12 +113,15 @@ else() unset( b2_libs ) endif() + set( TOOLSET "toolset=gcc" ) + if( APPLE ) # I set this to being compatible with wxWidgets - # wxWidgets still using libstdc++ (gcc), meanwhile OSX + # wxWidgets still using libstdc++ (gcc), meanwhile OSX # has switched to libc++ (llvm) by default set(BOOST_CXXFLAGS "cxxflags=-mmacosx-version-min=10.5" ) set(BOOST_LINKFLAGS "linkflags=-mmacosx-version-min=10.5" ) + set( TOOLSET "" ) if( CMAKE_OSX_ARCHITECTURES ) @@ -137,7 +140,6 @@ if( APPLE ) endif() endif() - endif() ExternalProject_Add( boost @@ -167,8 +169,9 @@ ExternalProject_Add( boost variant=release threading=multi ${PIC_STUFF} - ${BOOST_CXXFLAGS} - ${BOOST_LINKFLAGS} + ${TOOLSET} + ${BOOST_CXXFLAGS} + ${BOOST_LINKFLAGS} ${BOOST_ADDRESSMODEL} ${BOOST_ARCHITECTURE} ${b2_libs} diff --git a/pcbnew/dialogs/dialog_fp_lib_table.cpp b/pcbnew/dialogs/dialog_fp_lib_table.cpp index 8c287a35bb..57d33b6076 100644 --- a/pcbnew/dialogs/dialog_fp_lib_table.cpp +++ b/pcbnew/dialogs/dialog_fp_lib_table.cpp @@ -599,6 +599,12 @@ private: m_cur_grid->AutoSizeColumn( COL_NICKNAME, false ); m_cur_grid->AutoSizeColumn( COL_URI, false ); m_cur_grid->AutoSizeColumn( COL_TYPE, false ); + + // On Windows, the grid is not refresh, + // so force resfresh after a change +#ifdef __WINDOWS__ + Refresh(); +#endif } } @@ -607,7 +613,7 @@ private: EndModal( 0 ); } - void onCancelButtonClick( wxCloseEvent& event ) + void onCancelCaptionButtonClick( wxCloseEvent& event ) { EndModal( 0 ); } diff --git a/pcbnew/dialogs/dialog_fp_lib_table_base.cpp b/pcbnew/dialogs/dialog_fp_lib_table_base.cpp index 11a220201d..b88fd75902 100644 --- a/pcbnew/dialogs/dialog_fp_lib_table_base.cpp +++ b/pcbnew/dialogs/dialog_fp_lib_table_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 30 2013) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -190,7 +190,7 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID this->Centre( wxBOTH ); // Connect Events - this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelButtonClick ) ); + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelCaptionButtonClick ) ); this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FP_LIB_TABLE_BASE::onKeyDown ) ); m_auinotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( DIALOG_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this ); m_append_button->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this ); @@ -205,7 +205,7 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID DIALOG_FP_LIB_TABLE_BASE::~DIALOG_FP_LIB_TABLE_BASE() { // Disconnect Events - this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelButtonClick ) ); + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelCaptionButtonClick ) ); this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FP_LIB_TABLE_BASE::onKeyDown ) ); m_auinotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( DIALOG_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this ); m_append_button->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this ); diff --git a/pcbnew/dialogs/dialog_fp_lib_table_base.fbp b/pcbnew/dialogs/dialog_fp_lib_table_base.fbp index 11e3687fb3..52dfac0974 100644 --- a/pcbnew/dialogs/dialog_fp_lib_table_base.fbp +++ b/pcbnew/dialogs/dialog_fp_lib_table_base.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 0 0 @@ -59,7 +61,7 @@ - onCancelButtonClick + onCancelCaptionButtonClick diff --git a/pcbnew/dialogs/dialog_fp_lib_table_base.h b/pcbnew/dialogs/dialog_fp_lib_table_base.h index 7ea5300b1b..a9a456b1f5 100644 --- a/pcbnew/dialogs/dialog_fp_lib_table_base.h +++ b/pcbnew/dialogs/dialog_fp_lib_table_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 30 2013) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -57,7 +57,7 @@ class DIALOG_FP_LIB_TABLE_BASE : public DIALOG_SHIM wxButton* m_sdbSizer1Cancel; // Virtual event handlers, overide them in your derived class - virtual void onCancelButtonClick( wxCloseEvent& event ) = 0; + virtual void onCancelCaptionButtonClick( wxCloseEvent& event ) = 0; virtual void onKeyDown( wxKeyEvent& event ) = 0; virtual void pageChangedHandler( wxAuiNotebookEvent& event ) = 0; virtual void appendRowHandler( wxMouseEvent& event ) = 0; diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 193486946f..a2794c1b1f 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -1008,7 +1008,8 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER // Set maximum proximity threshold for point to point nearness metric for // board perimeter only, not interior keepouts yet. - prox = Mils2iu( 0 ); + prox = Millimeter2iu( 0.002 ); // should be enough to fix rounding issues + // is arc start and end point calculations // Output the Edge.Cuts perimeter as circle or polygon. if( graphic->GetShape() == S_CIRCLE ) @@ -1118,7 +1119,7 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER // Output the interior Edge.Cuts graphics as keepouts, using nearness metric // for sloppy graphical items. - prox = Mils2iu( 10 ); + prox = Millimeter2iu( 0.025 ); while( items.GetCount() ) {