wxDialog::wxDialog( wxWindow *parent,
wxWindowID id, const wxString &title,
const wxPoint &pos, const wxSize &size,
- const long style, const wxString &name )
+ long style, const wxString &name )
{
wxTopLevelWindows.Insert( this );
Create( parent, id, title, pos, size, style, name );
bool wxDialog::Create( wxWindow *parent,
wxWindowID id, const wxString &title,
const wxPoint &pos, const wxSize &size,
- const long style, const wxString &name )
+ long style, const wxString &name )
{
m_needParent = FALSE;
void wxDialog::OnCancel( wxCommandEvent &WXUNUSED(event) )
{
if (IsModal())
+ {
EndModal(wxID_CANCEL);
+ }
else
{
SetReturnCode(wxID_CANCEL);
if ( Validate() && TransferDataFromWindow())
{
if (IsModal())
+ {
EndModal(wxID_OK);
+ }
else
{
SetReturnCode(wxID_OK);
this->Show(FALSE);
};
};
- EndModal( wxID_OK );
};
void wxDialog::OnPaint( wxPaintEvent& WXUNUSED(event) )
static wxList closing;
if (closing.Member(this)) return FALSE; // no loops
-
+
closing.Append(this);
wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
};
};
-bool wxDialog::Show( const bool show )
+bool wxDialog::Show( bool show )
{
if (!show && m_modalShowing)
{