EndModal() isn't called twice any more

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-03-23 15:52:39 +00:00
parent f65635b5c9
commit 5919d76b44
2 changed files with 13 additions and 6 deletions

View File

@@ -7,7 +7,7 @@ OS=@OS@
RULE=bin RULE=bin
# define library name # define library name
BIN_TARGET=test BIN_TARGET=dialogs
# define library sources # define library sources
BIN_SRC=\ BIN_SRC=\
dialogs.cpp dialogs.cpp

View File

@@ -121,7 +121,7 @@ void MyFrame::ChooseColour(wxCommandEvent& WXUNUSED(event) )
myCanvas->Clear(); myCanvas->Clear();
myCanvas->Refresh(); myCanvas->Refresh();
} }
dialog->Close(); dialog->Destroy();
} }
void MyFrame::ChooseFont(wxCommandEvent& WXUNUSED(event) ) void MyFrame::ChooseFont(wxCommandEvent& WXUNUSED(event) )
@@ -138,7 +138,7 @@ void MyFrame::ChooseFont(wxCommandEvent& WXUNUSED(event) )
wxGetApp().m_canvasTextColour = retData.GetColour(); wxGetApp().m_canvasTextColour = retData.GetColour();
myCanvas->Refresh(); myCanvas->Refresh();
} }
dialog->Close(); dialog->Destroy();
} }
#if defined(__WXMSW__) && wxTEST_GENERIC_DIALOGS_IN_MSW #if defined(__WXMSW__) && wxTEST_GENERIC_DIALOGS_IN_MSW
@@ -162,7 +162,7 @@ void MyFrame::ChooseColourGeneric(wxCommandEvent& WXUNUSED(event))
myCanvas->Clear(); myCanvas->Clear();
myCanvas->Refresh(); myCanvas->Refresh();
} }
dialog->Close(); dialog->Destroy();
} }
void MyFrame::ChooseFontGeneric(wxCommandEvent& WXUNUSED(event) ) void MyFrame::ChooseFontGeneric(wxCommandEvent& WXUNUSED(event) )
@@ -179,7 +179,7 @@ void MyFrame::ChooseFontGeneric(wxCommandEvent& WXUNUSED(event) )
wxGetApp().m_canvasTextColour = retData.GetColour(); wxGetApp().m_canvasTextColour = retData.GetColour();
myCanvas->Refresh(); myCanvas->Refresh();
} }
dialog->Close(); dialog->Destroy();
} }
#endif #endif
@@ -226,7 +226,14 @@ void MyFrame::FileOpen(wxCommandEvent& WXUNUSED(event) )
if (dialog.ShowModal() == wxID_OK) if (dialog.ShowModal() == wxID_OK)
{ {
wxMessageDialog dialog2(this, dialog.GetPath(), "Selected path"); wxString info;
info.Printf("Full file name: %s\n"
"Path: %s\n"
"Name: %s",
dialog.GetPath().c_str(),
dialog.GetDirectory().c_str(),
dialog.GetFilename().c_str());
wxMessageDialog dialog2(this, info, "Selected file");
dialog2.ShowModal(); dialog2.ShowModal();
} }
} }