connect the affirmative/cancel button handlers to new ids, not old ones
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -458,16 +458,16 @@ void wxDialogBase::SetAffirmativeId(int affirmativeId)
|
|||||||
}
|
}
|
||||||
//else: wxID_OK is always handled
|
//else: wxID_OK is always handled
|
||||||
|
|
||||||
|
m_affirmativeId = affirmativeId;
|
||||||
|
|
||||||
// connect the handler to the new button
|
// connect the handler to the new button
|
||||||
if ( affirmativeId != wxID_NONE )
|
if ( m_affirmativeId != wxID_NONE )
|
||||||
{
|
{
|
||||||
Connect(m_affirmativeId,
|
Connect(m_affirmativeId,
|
||||||
wxEVT_COMMAND_BUTTON_CLICKED,
|
wxEVT_COMMAND_BUTTON_CLICKED,
|
||||||
wxCommandEventHandler(wxDialogBase::OnAffirmativeButton));
|
wxCommandEventHandler(wxDialogBase::OnAffirmativeButton));
|
||||||
}
|
}
|
||||||
//else: no affirmative button
|
//else: no affirmative button
|
||||||
|
|
||||||
m_affirmativeId = affirmativeId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDialogBase::SetEscapeId(int escapeId)
|
void wxDialogBase::SetEscapeId(int escapeId)
|
||||||
@@ -491,15 +491,15 @@ void wxDialogBase::SetEscapeId(int escapeId)
|
|||||||
}
|
}
|
||||||
//else: wxID_CANCEL is always handled
|
//else: wxID_CANCEL is always handled
|
||||||
|
|
||||||
|
m_escapeId = escapeId;
|
||||||
|
|
||||||
// connect the handler to the new button
|
// connect the handler to the new button
|
||||||
if ( escapeId != wxID_NONE )
|
if ( m_escapeId != wxID_NONE )
|
||||||
{
|
{
|
||||||
Connect(m_escapeId,
|
Connect(m_escapeId,
|
||||||
wxEVT_COMMAND_BUTTON_CLICKED,
|
wxEVT_COMMAND_BUTTON_CLICKED,
|
||||||
wxCommandEventHandler(wxDialogBase::OnCancelButton));
|
wxCommandEventHandler(wxDialogBase::OnCancelButton));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_escapeId = escapeId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user