]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/textctrl.mm
Add missing WXK constants for the control keys
[wxWidgets.git] / src / osx / cocoa / textctrl.mm
index 2daf86fb9462c522c4fc25efea419a93f2390294..b1364c509c5ae9ef478dff011c9788f04c4423c2 100644 (file)
@@ -867,7 +867,12 @@ void wxNSTextFieldControl::WriteText(const wxString& str)
     if ( editor )
     {
         wxMacEditHelper helper(m_textField);
     if ( editor )
     {
         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
     {