fixed pcbnew crash

This commit is contained in:
charras 2010-02-10 14:17:21 +00:00
parent 01726010f4
commit 3e8f7acd31
2 changed files with 3 additions and 14 deletions

View File

@ -93,11 +93,6 @@ void WinEDA_GraphicItemsOptionsDialog::AcceptOptions( wxCommandEvent& event )
}
/*!
* WinEDA_GraphicItemsOptionsDialog type definition
*/
IMPLEMENT_DYNAMIC_CLASS( WinEDA_GraphicItemsOptionsDialog, wxDialog )
/*!
* WinEDA_GraphicItemsOptionsDialog event table definition
@ -114,15 +109,9 @@ EVT_BUTTON( wxID_CANCEL, WinEDA_GraphicItemsOptionsDialog::OnCancelClick )
END_EVENT_TABLE()
/*!
* WinEDA_GraphicItemsOptionsDialog constructors
* WinEDA_GraphicItemsOptionsDialog constructor
*/
WinEDA_GraphicItemsOptionsDialog::WinEDA_GraphicItemsOptionsDialog()
{
m_BrdSettings = m_Parent->GetBoard()->GetBoardDesignSettings();
}
WinEDA_GraphicItemsOptionsDialog::WinEDA_GraphicItemsOptionsDialog(
WinEDA_BasePcbFrame* parent,
wxWindowID id,
@ -131,6 +120,8 @@ WinEDA_GraphicItemsOptionsDialog::WinEDA_GraphicItemsOptionsDialog(
const wxSize& size,
long style )
{
m_Parent = parent;
m_BrdSettings = m_Parent->GetBoard()->GetBoardDesignSettings();
Create( parent, id, caption, pos, size, style );
}

View File

@ -64,14 +64,12 @@
class WinEDA_GraphicItemsOptionsDialog: public wxDialog
{
DECLARE_DYNAMIC_CLASS( WinEDA_GraphicItemsOptionsDialog )
DECLARE_EVENT_TABLE()
public:
BOARD_DESIGN_SETTINGS* m_BrdSettings;
/// Constructors
WinEDA_GraphicItemsOptionsDialog( );
WinEDA_GraphicItemsOptionsDialog( WinEDA_BasePcbFrame* parent, wxWindowID id = SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_IDNAME, const wxString& caption = SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_TITLE, const wxPoint& pos = SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_POSITION, const wxSize& size = SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_SIZE, long style = SYMBOL_WINEDA_GRAPHICITEMSOPTIONSDIALOG_STYLE );
/// Creation