]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/textcmn.cpp
Keep the key up/down event consistency without relying on toupper()
[wxWidgets.git] / src / common / textcmn.cpp
index 4ff84d8a285005908e5fb948973e06f3d19c2015..a88d7f210badcae76697e5ad88c122274fa34d9b 100644 (file)
 // declarations
 // ============================================================================
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "textctrlbase.h"
-#endif
-
 // for compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -475,9 +471,12 @@ wxString wxTextCtrlBase::GetRange(long from, long to) const
 // do the window-specific processing after processing the update event
 void wxTextCtrlBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
 {
-    if ( event.GetSetEnabled() )
-        Enable(event.GetEnabled());
+    // call inherited, but skip the wxControl's version, and call directly the
+    // wxWindow's one instead, because the only reason why we are overriding this
+    // function is that we want to use SetValue() instead of wxControl::SetLabel()
+    wxWindowBase::DoUpdateWindowUI(event);
 
+    // update text
     if ( event.GetSetText() )
     {
         if ( event.GetText() != GetValue() )