Commit d7ac3682 authored by Maciej Suminski's avatar Maciej Suminski

PNS routing settings are stored between router invocations.

parent f31dd1cd
...@@ -172,6 +172,17 @@ public: ...@@ -172,6 +172,17 @@ public:
*/ */
void ApplySettings(); void ApplySettings();
/**
* Changes routing settings to ones passed in the parameter.
* @param aSettings are the new settings.
*/
void LoadSettings( const PNS_ROUTING_SETTINGS& aSettings )
{
m_settings = aSettings;
ApplySettings();
}
void EnableSnapping ( bool aEnable ) void EnableSnapping ( bool aEnable )
{ {
m_snappingEnabled = aEnable; m_snappingEnabled = aEnable;
......
...@@ -244,6 +244,7 @@ void ROUTER_TOOL::Reset( RESET_REASON aReason ) ...@@ -244,6 +244,7 @@ void ROUTER_TOOL::Reset( RESET_REASON aReason )
m_router->ClearWorld(); m_router->ClearWorld();
m_router->SetBoard( getModel<BOARD>( PCB_T ) ); m_router->SetBoard( getModel<BOARD>( PCB_T ) );
m_router->SyncWorld(); m_router->SyncWorld();
m_router->LoadSettings( m_settings );
m_needsSync = false; m_needsSync = false;
if( getView() ) if( getView() )
...@@ -620,6 +621,8 @@ void ROUTER_TOOL::performRouting() ...@@ -620,6 +621,8 @@ void ROUTER_TOOL::performRouting()
m_needsSync = true; m_needsSync = true;
} }
m_settings = m_router->Settings();
ctls->SetAutoPan( false ); ctls->SetAutoPan( false );
ctls->ForceCursorPosition( false ); ctls->ForceCursorPosition( false );
highlightNet( false ); highlightNet( false );
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <msgpanel.h> #include <msgpanel.h>
#include "pns_layerset.h" #include "pns_layerset.h"
#include "pns_routing_settings.h"
class PNS_ROUTER; class PNS_ROUTER;
class PNS_ITEM; class PNS_ITEM;
...@@ -68,6 +69,7 @@ private: ...@@ -68,6 +69,7 @@ private:
MSG_PANEL_ITEMS m_panelItems; MSG_PANEL_ITEMS m_panelItems;
PNS_ROUTER* m_router; PNS_ROUTER* m_router;
PNS_ROUTING_SETTINGS m_settings; ///< Stores routing settings between router invocations
PNS_ITEM* m_startItem; PNS_ITEM* m_startItem;
int m_startLayer; int m_startLayer;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment