From c660028ba4d929316e747f476836be0c359dda3e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 22 Nov 2010 19:41:02 +0100 Subject: [PATCH] Fix a bug that crashes Pcbnew when closing Freeroute dialog ( Only happens with wxWidgets 2.9.1, but this was a bug) --- pcbnew/dialog_freeroute_exchange.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pcbnew/dialog_freeroute_exchange.cpp b/pcbnew/dialog_freeroute_exchange.cpp index c2e941af65..969fcfaef5 100644 --- a/pcbnew/dialog_freeroute_exchange.cpp +++ b/pcbnew/dialog_freeroute_exchange.cpp @@ -25,7 +25,6 @@ void WinEDA_PcbFrame::Access_to_External_Tool( wxCommandEvent& event ) */ { DIALOG_FREEROUTE dialog( this ); - dialog.ShowModal(); } @@ -134,8 +133,7 @@ void DIALOG_FREEROUTE::OnVisitButtonClick( wxCommandEvent& event ) void DIALOG_FREEROUTE::OnCancelButtonClick( wxCommandEvent& event ) { - D(printf("OnCancelClick\n");) - Close( true ); + EndModal(wxID_CANCEL); } @@ -147,7 +145,7 @@ void DIALOG_FREEROUTE::OnOKButtonClick( wxCommandEvent& event ) m_FreerouteURLName->GetValue() ); } - Destroy(); + EndModal(wxID_OK); }