diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index b82523c893..8935357039 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -220,9 +220,11 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : // Must be created before the menus are created. if( ADVANCED_CFG::GetCfg().m_ShowPcbnewExportNetlist ) + { m_exportNetlistAction = new TOOL_ACTION( "pcbnew.EditorControl.exportNetlist", AS_GLOBAL, 0, "", _( "Netlist..." ), _( "Export netlist used to update schematics" ) ); + } // Create GAL canvas auto canvas = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_frameSize, diff --git a/pcbnew/tools/board_editor_control.cpp b/pcbnew/tools/board_editor_control.cpp index c0c07a9040..c7916413dc 100644 --- a/pcbnew/tools/board_editor_control.cpp +++ b/pcbnew/tools/board_editor_control.cpp @@ -477,6 +477,7 @@ int BOARD_EDITOR_CONTROL::ExportNetlist( const TOOL_EVENT& aEvent ) } nlohmann::ordered_map fields; + for( PCB_FIELD* field : footprint->Fields() ) fields[field->GetCanonicalName()] = field->GetText(); @@ -1636,12 +1637,12 @@ int BOARD_EDITOR_CONTROL::DrillOrigin( const TOOL_EVENT& aEvent ) Activate(); picker->SetClickHandler( - [this] ( const VECTOR2D& pt ) -> bool - { - m_frame->SaveCopyInUndoList( m_placeOrigin.get(), UNDO_REDO::DRILLORIGIN ); - DoSetDrillOrigin( getView(), m_frame, m_placeOrigin.get(), pt ); - return false; // drill origin is a one-shot; don't continue with tool - } ); + [this] ( const VECTOR2D& pt ) -> bool + { + m_frame->SaveCopyInUndoList( m_placeOrigin.get(), UNDO_REDO::DRILLORIGIN ); + DoSetDrillOrigin( getView(), m_frame, m_placeOrigin.get(), pt ); + return false; // drill origin is a one-shot; don't continue with tool + } ); m_toolMgr->RunAction( ACTIONS::pickerTool, &aEvent ); @@ -1670,9 +1671,11 @@ void BOARD_EDITOR_CONTROL::setTransitions() Go( &BOARD_EDITOR_CONTROL::ImportSpecctraSession, PCB_ACTIONS::importSpecctraSession.MakeEvent() ); Go( &BOARD_EDITOR_CONTROL::ExportSpecctraDSN, PCB_ACTIONS::exportSpecctraDSN.MakeEvent() ); - if( ADVANCED_CFG::GetCfg().m_ShowPcbnewExportNetlist && m_frame && - m_frame->GetExportNetlistAction() ) + if( ADVANCED_CFG::GetCfg().m_ShowPcbnewExportNetlist && m_frame + && m_frame->GetExportNetlistAction() ) + { Go( &BOARD_EDITOR_CONTROL::ExportNetlist, m_frame->GetExportNetlistAction()->MakeEvent() ); + } Go( &BOARD_EDITOR_CONTROL::GenerateDrillFiles, PCB_ACTIONS::generateDrillFiles.MakeEvent() ); Go( &BOARD_EDITOR_CONTROL::GenerateFabFiles, PCB_ACTIONS::generateGerbers.MakeEvent() );