From 82f8cd72a3403621d928d2ecbbcc0134fc3e6ca9 Mon Sep 17 00:00:00 2001 From: Mike Williams Date: Wed, 17 Aug 2022 14:02:42 -0400 Subject: [PATCH] PNS Router IFACE: Add board commit mode control --- pcbnew/router/pns_kicad_iface.cpp | 3 ++- pcbnew/router/pns_kicad_iface.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp index 5cc2438392..c4b75ec0f4 100644 --- a/pcbnew/router/pns_kicad_iface.cpp +++ b/pcbnew/router/pns_kicad_iface.cpp @@ -894,6 +894,7 @@ PNS_KICAD_IFACE::PNS_KICAD_IFACE() m_tool = nullptr; m_view = nullptr; m_previewItems = nullptr; + m_commitFlags = 0; } @@ -1699,7 +1700,7 @@ void PNS_KICAD_IFACE::Commit() m_fpOffsets.clear(); - m_commit->Push( _( "Interactive Router" ) ); + m_commit->Push( _( "Interactive Router" ), m_commitFlags ); m_commit = std::make_unique( m_tool ); } diff --git a/pcbnew/router/pns_kicad_iface.h b/pcbnew/router/pns_kicad_iface.h index 4ef24ab63e..c59db93f1a 100644 --- a/pcbnew/router/pns_kicad_iface.h +++ b/pcbnew/router/pns_kicad_iface.h @@ -126,6 +126,8 @@ public: EDA_UNITS GetUnits() const override; + void SetCommitFlags( int aCommitFlags ) { m_commitFlags = aCommitFlags; } + private: struct OFFSET { @@ -139,6 +141,7 @@ private: PCB_TOOL_BASE* m_tool; std::unique_ptr m_commit; + int m_commitFlags; };