turning off undo for setter, otherwise memory gets used up for the undo stack, fixes #14500
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -867,7 +867,12 @@ void wxNSTextFieldControl::WriteText(const wxString& str)
|
|||||||
if ( editor )
|
if ( editor )
|
||||||
{
|
{
|
||||||
wxMacEditHelper helper(m_textField);
|
wxMacEditHelper helper(m_textField);
|
||||||
|
BOOL hasUndo = [editor respondsToSelector:@selector(setAllowsUndo:)];
|
||||||
|
if ( hasUndo )
|
||||||
|
[editor setAllowsUndo:NO];
|
||||||
[editor insertText:wxCFStringRef( str , m_wxPeer->GetFont().GetEncoding() ).AsNSString()];
|
[editor insertText:wxCFStringRef( str , m_wxPeer->GetFont().GetEncoding() ).AsNSString()];
|
||||||
|
if ( hasUndo )
|
||||||
|
[editor setAllowsUndo:YES];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user