Fixed crash on double switching to legacy canvas on start.
This commit is contained in:
parent
9d27caca75
commit
1073ba1999
|
@ -532,7 +532,7 @@ void PCB_EDIT_FRAME::setupTools()
|
||||||
{
|
{
|
||||||
// Create the manager and dispatcher & route draw panel events to the dispatcher
|
// Create the manager and dispatcher & route draw panel events to the dispatcher
|
||||||
m_toolManager = new TOOL_MANAGER;
|
m_toolManager = new TOOL_MANAGER;
|
||||||
m_toolManager->SetEnvironment( NULL, GetGalCanvas()->GetView(),
|
m_toolManager->SetEnvironment( m_Pcb, GetGalCanvas()->GetView(),
|
||||||
GetGalCanvas()->GetViewControls(), this );
|
GetGalCanvas()->GetViewControls(), this );
|
||||||
m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager );
|
m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager );
|
||||||
|
|
||||||
|
@ -661,6 +661,9 @@ void PCB_EDIT_FRAME::UseGalCanvas( bool aEnable )
|
||||||
{
|
{
|
||||||
EDA_DRAW_FRAME::UseGalCanvas( aEnable );
|
EDA_DRAW_FRAME::UseGalCanvas( aEnable );
|
||||||
|
|
||||||
|
m_toolManager->SetEnvironment( m_Pcb, GetGalCanvas()->GetView(),
|
||||||
|
GetGalCanvas()->GetViewControls(), this );
|
||||||
|
|
||||||
if( aEnable )
|
if( aEnable )
|
||||||
{
|
{
|
||||||
SetBoard( m_Pcb );
|
SetBoard( m_Pcb );
|
||||||
|
|
Loading…
Reference in New Issue