Don't resend an update event from m_spin to avoid recursion
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -51,6 +51,15 @@ protected:
|
|||||||
{
|
{
|
||||||
m_spin->GetSpinButton()->SetValue(val);
|
m_spin->GetSpinButton()->SetValue(val);
|
||||||
|
|
||||||
|
// If we're already processing a text update from m_spin,
|
||||||
|
// don't send it again, since we could end up recursing
|
||||||
|
// infinitely.
|
||||||
|
if (event.GetId() == m_spin->GetId())
|
||||||
|
{
|
||||||
|
event.Skip();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Send event that the text was manually changed
|
// Send event that the text was manually changed
|
||||||
wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_spin->GetId());
|
wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, m_spin->GetId());
|
||||||
event.SetEventObject(m_spin);
|
event.SetEventObject(m_spin);
|
||||||
|
Reference in New Issue
Block a user