Changeset 164

Show
Ignore:
Timestamp:
10/06/10 11:58:53 (20 months ago)
Author:
Carsten
Message:

CaWE: Fixed arrow keys handling in 3D views under wxGTK.

Location:
cafu/trunk/CaWE
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • cafu/trunk/CaWE/ChildFrameViewWin2D.cpp

    r163 r164  
    8888    EVT_SCROLLWIN         (ViewWindow2DT::OnScroll          )     // Scroll event. 
    8989    EVT_PAINT             (ViewWindow2DT::OnPaint           )     // Paint event. 
    90     EVT_ERASE_BACKGROUND  (ViewWindow2DT::OnEraseBackground )     // Erase background event. 
    9190    EVT_SIZE              (ViewWindow2DT::OnSize            )     // Size event. 
    9291    EVT_MOUSE_CAPTURE_LOST(ViewWindow2DT::OnMouseCaptureLost) 
     
    109108{ 
    110109    SetMinSize(wxSize(120, 90)); 
     110    SetBackgroundStyle(wxBG_STYLE_PAINT);   // Our paint event handler handles erasing the background. 
    111111 
    112112    SetZoom(0.25);                  // Calls UpdateScrollbars(), which calls SetScrollbar(hor/ver) and Refresh(), then calls SetScrollPos(hor/ver). 
     
    13131313 
    13141314 
    1315 void ViewWindow2DT::OnEraseBackground(wxEraseEvent& EE) 
    1316 { 
    1317     // Do nothing (i.e. do *not* erase the background). 
    1318 } 
    1319  
    1320  
    13211315void ViewWindow2DT::OnSize(wxSizeEvent& SE) 
    13221316{ 
  • cafu/trunk/CaWE/ChildFrameViewWin2D.hpp

    r163 r164  
    146146    void OnContextMenu     (wxContextMenuEvent&      CE); 
    147147    void OnPaint           (wxPaintEvent&            PE); 
    148     void OnEraseBackground (wxEraseEvent&            EE); 
    149148    void OnSize            (wxSizeEvent&             SE); 
    150149    void OnMouseCaptureLost(wxMouseCaptureLostEvent& ME); 
  • cafu/trunk/CaWE/ChildFrameViewWin3D.cpp

    r163 r164  
    479479            break; 
    480480 
     481        case WXK_UP: 
     482        case WXK_DOWN: 
     483        case WXK_LEFT: 
     484        case WXK_RIGHT: 
     485            // Handle the arrow keys here (so that KE.Skip() is not called for them), in order to 
     486            // prevent (under wxGTK) that the default processing moves the focus to another window. 
     487            break; 
     488 
    481489        default: 
    482490            KE.Skip();