From 28b93176402c99ddcd9f47386147278d381439db Mon Sep 17 00:00:00 2001 From: Orson Date: Fri, 1 Nov 2013 13:56:20 +0100 Subject: [PATCH] Fix redraw issue in modedit a modview, with GAL --- CMakeLists.txt | 7 +++++-- cvpcb/class_DisplayFootprintsFrame.cpp | 2 -- include/geometry/shape_line_chain.h | 4 ++-- pcbnew/basepcbframe.cpp | 2 ++ pcbnew/moduleframe.cpp | 6 ++++-- pcbnew/router/pns_node.h | 1 + 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c389cee92..c2440eb5cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ option( KICAD_SCRIPTING_MODULES option( KICAD_SCRIPTING_WXPYTHON "set this option ON to build wxpython implementation for wx interface building in python and py.shell" ) - + # when option KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES is enabled: # PYTHON_EXECUTABLE can be defined when invoking cmake # ( use -DPYTHON_EXECUTABLE=/python.exe or python2 ) @@ -65,6 +65,9 @@ endif() set( DOWNLOAD_DIR ${PROJECT_SOURCE_DIR}/.downloads-by-cmake CACHE PATH "Location of KiCad downloads, suggested is a dir common to all builds, i.e. global." ) +#Add option to add user directories for linker, if any +LINK_DIRECTORIES( ${LINK_DIRECTORIES_PATH} ) + if( UNIX ) set( KICAD_USER_CONFIG_DIR $ENV{HOME} CACHE PATH "Location of user specifig KiCad config files" ) elseif( MINGW ) @@ -230,7 +233,7 @@ include( ExternalProject ) #================================================ include( CheckFindPackageResult ) -# Turn on wxWidgets compatibility mode for some classes +# Turn on wxWidgets compatibility mode for some classes add_definitions(-DWX_COMPATIBILITY) ####################### diff --git a/cvpcb/class_DisplayFootprintsFrame.cpp b/cvpcb/class_DisplayFootprintsFrame.cpp index 2bc8e2c851..381e90dd97 100644 --- a/cvpcb/class_DisplayFootprintsFrame.cpp +++ b/cvpcb/class_DisplayFootprintsFrame.cpp @@ -122,8 +122,6 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( CVPCB_MAINFRAME* parent, EDA_PANEINFO mesg; mesg.MessageToolbarPane(); - m_galCanvas->Hide(); - m_auimgr.AddPane( m_mainToolBar, wxAuiPaneInfo( horiz ).Name( wxT( "m_mainToolBar" ) ).Top(). Row( 0 ) ); diff --git a/include/geometry/shape_line_chain.h b/include/geometry/shape_line_chain.h index 44505a3668..5108191bb7 100644 --- a/include/geometry/shape_line_chain.h +++ b/include/geometry/shape_line_chain.h @@ -188,7 +188,7 @@ public: if( aIndex < 0 ) aIndex += SegmentCount(); - if( aIndex == ( m_points.size() - 1 ) && m_closed ) + if( aIndex == (int)( m_points.size() - 1 ) && m_closed ) return SEG( m_points[aIndex], m_points[0], aIndex ); else return SEG( m_points[aIndex], m_points[aIndex + 1], aIndex ); @@ -207,7 +207,7 @@ public: if( aIndex < 0 ) aIndex += SegmentCount(); - if( aIndex == ( m_points.size() - 1 ) && m_closed ) + if( aIndex == (int)( m_points.size() - 1 ) && m_closed ) return SEG( const_cast( m_points[aIndex] ), const_cast( m_points[0] ), aIndex ); else diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 12ebdf4741..a354258f15 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -151,6 +151,8 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, m_galCanvas = new EDA_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL ); + // Hide by default, it has to be explicitly shown + m_galCanvas->Hide(); m_auxiliaryToolBar = NULL; } diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 0d4b2f052e..25bb6a03a2 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -224,11 +224,13 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( PCB_EDIT_FRAME* aParent, FP_LIB_TABL m_auimgr.AddPane( m_auxiliaryToolBar, wxAuiPaneInfo( horiz ).Name( wxT( "m_auxiliaryToolBar" ) ).Top().Row( 1 ) ); + // The main right vertical toolbar m_auimgr.AddPane( m_drawToolBar, - wxAuiPaneInfo( vert ).Name( wxT( "m_VToolBar" ) ).Right() ); + wxAuiPaneInfo( vert ).Name( wxT( "m_VToolBar" ) ).Right().Layer(1) ); + // The left vertical toolbar (fast acces to display options) m_auimgr.AddPane( m_optionsToolBar, - wxAuiPaneInfo( vert ).Name( wxT( "m_optionsToolBar" ) ). Left() ); + wxAuiPaneInfo( vert ).Name( wxT( "m_optionsToolBar" ) ). Left().Layer(1) ); m_auimgr.AddPane( m_canvas, wxAuiPaneInfo().Name( wxT( "DrawFrame" ) ).CentrePane() ); diff --git a/pcbnew/router/pns_node.h b/pcbnew/router/pns_node.h index bec5c1bce4..f88b74bd4f 100644 --- a/pcbnew/router/pns_node.h +++ b/pcbnew/router/pns_node.h @@ -49,6 +49,7 @@ class PNS_CLEARANCE_FUNC { public: virtual int operator()( const PNS_ITEM* a, const PNS_ITEM* b ) = 0; + virtual ~PNS_CLEARANCE_FUNC() {} }; /**