Don't emit wxEVT_TEXT in wxMSW's wxTextCtrl::SetFont().
Native text control sends EN_CHANGE when the font changes, producing a wxEVT_TEXT event as if the user changed the value. This is not the case, so supress the event. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2520,6 +2520,11 @@ bool wxTextCtrl::SetForegroundColour(const wxColour& colour)
|
||||
|
||||
bool wxTextCtrl::SetFont(const wxFont& font)
|
||||
{
|
||||
// Native text control sends EN_CHANGE when the font changes, producing
|
||||
// a wxEVT_TEXT event as if the user changed the value. This is not
|
||||
// the case, so supress the event.
|
||||
wxEventBlocker block(this, wxEVT_TEXT);
|
||||
|
||||
if ( !wxTextCtrlBase::SetFont(font) )
|
||||
return false;
|
||||
|
||||
|
Reference in New Issue
Block a user