Commit 84344983 authored by Dick Hollenbeck's avatar Dick Hollenbeck

Fix new bug which crashed pcbnew running under kicad.exe while adding a new module in mod editor

parent 3b071287
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <fctsys.h> #include <fctsys.h>
#include <pgm_base.h> #include <pgm_base.h>
//#include <kiface_i.h> #include <kiway.h>
#include <project.h> #include <project.h>
#include <class_drawpanel.h> #include <class_drawpanel.h>
#include <confirm.h> #include <confirm.h>
...@@ -50,7 +50,6 @@ ...@@ -50,7 +50,6 @@
#include <hotkeys.h> #include <hotkeys.h>
#include <module_editor_frame.h> #include <module_editor_frame.h>
#include <wildcards_and_files_ext.h> #include <wildcards_and_files_ext.h>
#include <kiway.h>
static PCB_SCREEN* s_screenModule; // the PCB_SCREEN used by the footprint editor static PCB_SCREEN* s_screenModule; // the PCB_SCREEN used by the footprint editor
...@@ -296,7 +295,8 @@ BOARD_DESIGN_SETTINGS& FOOTPRINT_EDIT_FRAME::GetDesignSettings() const ...@@ -296,7 +295,8 @@ BOARD_DESIGN_SETTINGS& FOOTPRINT_EDIT_FRAME::GetDesignSettings() const
{ {
// get the BOARD_DESIGN_SETTINGS from the parent editor, not our BOARD. // get the BOARD_DESIGN_SETTINGS from the parent editor, not our BOARD.
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) GetParent(); // @todo(DICK) change the routing to some default or the board directly, parent may not exist
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true );
wxASSERT( parentFrame ); wxASSERT( parentFrame );
...@@ -308,7 +308,8 @@ void FOOTPRINT_EDIT_FRAME::SetDesignSettings( const BOARD_DESIGN_SETTINGS& aSett ...@@ -308,7 +308,8 @@ void FOOTPRINT_EDIT_FRAME::SetDesignSettings( const BOARD_DESIGN_SETTINGS& aSett
{ {
// set the BOARD_DESIGN_SETTINGS into parent editor, not our BOARD. // set the BOARD_DESIGN_SETTINGS into parent editor, not our BOARD.
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) GetParent(); // @todo(DICK) change the routing to some default or the board directly, parent may not exist
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true );
wxASSERT( parentFrame ); wxASSERT( parentFrame );
...@@ -320,7 +321,8 @@ const PCB_PLOT_PARAMS& FOOTPRINT_EDIT_FRAME::GetPlotSettings() const ...@@ -320,7 +321,8 @@ const PCB_PLOT_PARAMS& FOOTPRINT_EDIT_FRAME::GetPlotSettings() const
{ {
// get the settings from the parent editor, not our BOARD. // get the settings from the parent editor, not our BOARD.
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) GetParent(); // @todo(DICK) change the routing to some default or the board directly, parent may not exist
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true );
wxASSERT( parentFrame ); wxASSERT( parentFrame );
...@@ -332,7 +334,8 @@ void FOOTPRINT_EDIT_FRAME::SetPlotSettings( const PCB_PLOT_PARAMS& aSettings ) ...@@ -332,7 +334,8 @@ void FOOTPRINT_EDIT_FRAME::SetPlotSettings( const PCB_PLOT_PARAMS& aSettings )
{ {
// set the settings into parent editor, not our BOARD. // set the settings into parent editor, not our BOARD.
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) GetParent(); // @todo(DICK) change the routing to some default or the board directly, parent may not exist
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true );
wxASSERT( parentFrame ); wxASSERT( parentFrame );
......
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