~cern-kicad/kicad/kicad-pns-tom

« back to all changes in this revision

Viewing changes to common/drawpanel.cpp

  • Committer: Maciej Suminski
  • Date: 2013-08-02 13:57:24 UTC
  • mfrom: (4024.1.238 kicad)
  • mto: This revision was merged to the branch mainline in revision 4221.
  • Revision ID: maciej.suminski@cern.ch-20130802135724-gix6orezshkukodv
Upstream merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
564
564
        g_GhostColor = WHITE;
565
565
    }
566
566
 
 
567
    GRResetPenAndBrush( DC );
 
568
 
 
569
    DC->SetBackground( g_DrawBgColor == BLACK ? *wxBLACK_BRUSH : *wxWHITE_BRUSH );
 
570
    DC->SetBackgroundMode( wxSOLID );
 
571
 
567
572
    if( erasebg )
568
573
        EraseScreen( DC );
569
574
 
570
 
    GRResetPenAndBrush( DC );
571
 
 
572
 
    DC->SetBackground( *wxBLACK_BRUSH );
573
 
    DC->SetBackgroundMode( wxSOLID );
574
575
    GetParent()->RedrawActiveWindow( DC, erasebg );
575
576
 
576
577
    // Verfies that the clipping is working correctly.  If these two sets of numbers are
881
882
    wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
882
883
    cmd.SetEventObject( this );
883
884
 
 
885
    bool offCenterReq = event.ControlDown() && event.ShiftDown();
 
886
    offCenterReq = offCenterReq || m_enableZoomNoCenter;
 
887
 
884
888
    // This is a zoom in or out command
885
889
    if( event.GetWheelRotation() > 0 )
886
890
    {
888
892
            cmd.SetId( ID_PAN_UP );
889
893
        else if( event.ControlDown() && !event.ShiftDown() )
890
894
            cmd.SetId( ID_PAN_LEFT );
891
 
        else if( (event.ControlDown() && event.ShiftDown() )
892
 
                 || m_enableZoomNoCenter)
 
895
        else if( offCenterReq )
893
896
            cmd.SetId( ID_OFFCENTER_ZOOM_IN );
894
897
        else
895
898
            cmd.SetId( ID_POPUP_ZOOM_IN );
900
903
            cmd.SetId( ID_PAN_DOWN );
901
904
        else if( event.ControlDown() && !event.ShiftDown() )
902
905
            cmd.SetId( ID_PAN_RIGHT );
903
 
        else if( event.AltDown() || m_enableZoomNoCenter)
 
906
        else if( offCenterReq )
904
907
            cmd.SetId( ID_OFFCENTER_ZOOM_OUT );
905
908
        else
906
909
            cmd.SetId( ID_POPUP_ZOOM_OUT );