PNS routing settings are stored between router invocations.

This commit is contained in:
Maciej Suminski 2014-05-14 16:53:49 +02:00
parent f31dd1cdaf
commit d7ac368260
3 changed files with 16 additions and 0 deletions

View File

@ -172,6 +172,17 @@ public:
*/
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 )
{
m_snappingEnabled = aEnable;

View File

@ -244,6 +244,7 @@ void ROUTER_TOOL::Reset( RESET_REASON aReason )
m_router->ClearWorld();
m_router->SetBoard( getModel<BOARD>( PCB_T ) );
m_router->SyncWorld();
m_router->LoadSettings( m_settings );
m_needsSync = false;
if( getView() )
@ -620,6 +621,8 @@ void ROUTER_TOOL::performRouting()
m_needsSync = true;
}
m_settings = m_router->Settings();
ctls->SetAutoPan( false );
ctls->ForceCursorPosition( false );
highlightNet( false );

View File

@ -34,6 +34,7 @@
#include <msgpanel.h>
#include "pns_layerset.h"
#include "pns_routing_settings.h"
class PNS_ROUTER;
class PNS_ITEM;
@ -68,6 +69,7 @@ private:
MSG_PANEL_ITEMS m_panelItems;
PNS_ROUTER* m_router;
PNS_ROUTING_SETTINGS m_settings; ///< Stores routing settings between router invocations
PNS_ITEM* m_startItem;
int m_startLayer;