From 1c8fd8b207c723ea631b9c55fb15bb1ee40f2ced Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Jun 2015 15:29:26 +0200 Subject: [PATCH] Eeschema: remove the run cvpcb menu entry from eeschema tools menu when running as stand alone. Pcbnew: fixes a problem exporting to DSN where the layername for B_Cu provided to the *.DSN file was incorrect --- eeschema/menubar.cpp | 15 +++++++++------ pcbnew/specctra.cpp | 9 ++++----- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index b6b34d4d95..d3f12050e0 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -465,12 +465,15 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() toolsMenu->AppendSeparator(); - // Run CvPcb - AddMenuItem( toolsMenu, - ID_RUN_CVPCB, - _( "A&ssign Component Footprint" ), - _( "Run CvPcb" ), - KiBitmap( cvpcb_xpm ) ); + if( !Kiface().IsSingle() ) // only with a functional KIWAY, not single_top + { + // Run CvPcb + AddMenuItem( toolsMenu, + ID_RUN_CVPCB, + _( "A&ssign Component Footprint" ), + _( "Run CvPcb" ), + KiBitmap( cvpcb_xpm ) ); + } // Run Pcbnew AddMenuItem( toolsMenu, diff --git a/pcbnew/specctra.cpp b/pcbnew/specctra.cpp index c7ddafce3e..8155fda604 100644 --- a/pcbnew/specctra.cpp +++ b/pcbnew/specctra.cpp @@ -109,13 +109,12 @@ void SPECCTRA_DB::buildLayerMaps( BOARD* aBoard ) for( unsigned i = 0; i < pcbLayer2kicad.size(); ++i ) { - if( i < layerCount-1 ) - pcbLayer2kicad[i] = ToLAYER_ID( i ); - else - pcbLayer2kicad[i] = B_Cu; + LAYER_ID id = ( i < layerCount-1 ) ? ToLAYER_ID( i ) : B_Cu; + + kicadLayer2pcb[i] = id; // save the specctra layer name in SPECCTRA_DB::layerIds for later. - layerIds.push_back( TO_UTF8( aBoard->GetLayerName( ToLAYER_ID( i ) ) ) ); + layerIds.push_back( TO_UTF8( aBoard->GetLayerName( id ) ) ); } #endif