diff --git a/common/gr_basic.cpp b/common/gr_basic.cpp index c6af6df05f..55fdf18dc4 100644 --- a/common/gr_basic.cpp +++ b/common/gr_basic.cpp @@ -216,7 +216,7 @@ void GRSetColorPen( wxDC* DC, EDA_COLOR_T Color, int width, wxPenStyle style ) wxColour wx_color = MakeColour( Color ); const wxPen& curr_pen = DC->GetPen(); - if( curr_pen.GetColour() != wx_color + if( !curr_pen.IsOk() || curr_pen.GetColour() != wx_color || curr_pen.GetWidth() != width || curr_pen.GetStyle() != style ) { diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index 3a79bf3b21..ae7c9117f0 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -6,7 +6,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2013 CERN (www.cern.ch) * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors. * @@ -249,7 +249,17 @@ void KICAD_MANAGER_FRAME::TERMINATE_HANDLER::OnTerminate( int pid, int status ) wxString msg = wxString::Format( _( "%s closed [pid=%d]\n" ), GetChars( appName ), pid ); - ( (KICAD_MANAGER_FRAME*) Pgm().App().GetTopWindow() )->PrintMsg( msg ); + wxWindow* window = wxWindow::FindWindowByName( KICAD_MANAGER_FRAME_NAME ); + + if( window ) // Should always happen. + { + // Be sure the kicad frame manager is found + // This dynamic cast is not really mandatory, but ... + KICAD_MANAGER_FRAME* frame = dynamic_cast (window); + + if( frame ) + frame->PrintMsg( msg ); + } delete this; } diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index 7585dcac40..5806438fe1 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -149,12 +149,11 @@ void DIALOG_PLOT::Init_Dialog() // Could devote a PlotOrder() function in place of UIOrder(). m_layerList = m_board->GetEnabledLayers().UIOrder(); + // Populate the check list box by all enabled layers names for( LSEQ seq = m_layerList; seq; ++seq ) { LAYER_ID layer = *seq; - m_layerList.push_back( layer ); - int checkIndex = m_layerCheckListBox->Append( m_board->GetLayerName( layer ) ); if( m_plotOpts.GetLayerSelection()[layer] ) diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 9e6aa85bbe..84ba35719c 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -168,11 +168,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() _( "Generate IPC-D-356 netlist file" ), KiBitmap( netlist_xpm ) ); - AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_CMP_FILE, - _( "&Component (.cmp) File" ), - _( "(Re)create components file (*.cmp) for CvPcb" ), - KiBitmap( create_cmp_file_xpm ) ); - AddMenuItem( fabricationOutputsMenu, ID_PCB_GEN_BOM_FILE_FROM_BOARD, _( "&BOM File" ), _( "Create a bill of materials from schematic" ), @@ -222,6 +217,11 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() _( "I&DFv3" ), _( "IDFv3 board and component export" ), KiBitmap( export_idf_xpm ) ); + AddMenuItem( submenuexport, ID_PCB_GEN_CMP_FILE, + _( "&Component (.cmp) File" ), + _( "Export component file (*.cmp) for Eeschema footprint field back-annotation" ), + KiBitmap( create_cmp_file_xpm ) ); + AddMenuItem( filesMenu, submenuexport, ID_GEN_EXPORT_FILE, _( "E&xport" ), _( "Export board" ), KiBitmap( export_xpm ) );