diff --git a/pcbnew/router/pns_algo_base.cpp b/pcbnew/router/pns_algo_base.cpp index db72c79c29..89b7c5d938 100644 --- a/pcbnew/router/pns_algo_base.cpp +++ b/pcbnew/router/pns_algo_base.cpp @@ -33,7 +33,7 @@ ROUTING_SETTINGS& ALGO_BASE::Settings() const LOGGER* ALGO_BASE::Logger() { - return nullptr; + return m_logger; } diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 704fec85c6..e1bc371dd9 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -64,7 +65,10 @@ ROUTER::ROUTER() m_state = IDLE; m_mode = PNS_MODE_ROUTE_SINGLE; - m_logger = new LOGGER; + m_logger = nullptr; + + if( ADVANCED_CFG::GetCfg().m_EnableRouterDump ) + m_logger = new LOGGER; // Initialize all other variables: m_lastNode = nullptr; @@ -899,7 +903,9 @@ std::optional ROUTER::UndoLastSegment() if( !RoutingInProgress() ) return std::nullopt; - m_logger->Log( LOGGER::EVT_UNFIX ); + if( m_logger ) + m_logger->Log( LOGGER::EVT_UNFIX ); + return m_placer->UnfixRoute(); } diff --git a/pcbnew/router/pns_shove.h b/pcbnew/router/pns_shove.h index 2225b638b0..19457bfea7 100644 --- a/pcbnew/router/pns_shove.h +++ b/pcbnew/router/pns_shove.h @@ -58,11 +58,6 @@ public: SHOVE( NODE* aWorld, ROUTER* aRouter ); ~SHOVE(); - virtual LOGGER* Logger() override - { - return &m_logger; - } - SHOVE_STATUS ShoveLines( const LINE& aCurrentHead ); SHOVE_STATUS ShoveMultiLines( const ITEM_SET& aHeadSet ); @@ -176,7 +171,6 @@ private: OPT_LINE m_newHead; - LOGGER m_logger; VIA* m_draggedVia; int m_iter;