- // NOTE: this SetValue() will generate an unwanted wxEVT_COMMAND_TEXT_UPDATED
- // which will trigger a unneeded UpdateFromTextCtrl(); thus before using
- // SetValue() we set the m_bIgnoreNextTextCtrlUpdate flag...
- m_bIgnoreNextTextCtrlUpdate = true;
- m_text->SetValue(Font2String(M_PICKER->GetSelectedFont()));
+ // Take care to use ChangeValue() here and not SetValue() to avoid
+ // infinite recursion.
+ m_text->ChangeValue(Font2String(M_PICKER->GetSelectedFont()));