]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/timectrl.cpp
Explicitly include X11/Xlib.h to fix AIX build.
[wxWidgets.git] / src / generic / timectrl.cpp
index af10b288f1bd25c161919b626d7cdc96ba97fbba..b3d0e5acafb79edc5f34e860a841547f50309323 100644 (file)
@@ -300,24 +300,16 @@ private:
         }
 
         ChangeCurrentField(field);
-
-        // As we don't skip the event, we also prevent the system from setting
-        // focus to this control as it does by default, so do it manually.
-        m_text->SetFocus();
     }
 
     void OnArrowUp(wxSpinEvent& WXUNUSED(event))
     {
         ChangeCurrentFieldBy1(Dir_Up);
-
-        m_text->SetFocus();
     }
 
     void OnArrowDown(wxSpinEvent& WXUNUSED(event))
     {
         ChangeCurrentFieldBy1(Dir_Down);
-
-        m_text->SetFocus();
     }
 
 
@@ -376,6 +368,8 @@ private:
     // Select the currently actively field.
     void HighlightCurrentField()
     {
+        m_text->SetFocus();
+
         const CharRange range = GetFieldRange(m_currentField);
 
         m_text->SetSelection(range.from, range.to);