Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 661360 | Differences between
and this patch

Collapse All | Expand All

(-)a/gui-wx/wxview.cpp (+15 lines)
Lines 2801-2806 void PatternView::OnMouseDown(wxMouseEvent& event) Link Here
2801
    int button = event.GetButton();
2801
    int button = event.GetButton();
2802
    int modifiers = GetMouseModifiers(event);
2802
    int modifiers = GetMouseModifiers(event);
2803
    
2803
    
2804
    // ignore if a mouse button is already down
2805
    if (mouseisdown) return;
2806
2807
    // flag that a mouse button is down
2808
    mouseisdown = true;
2809
    whichbuttondown = button;
2810
2804
    if (waitingforclick && button == wxMOUSE_BTN_LEFT) {
2811
    if (waitingforclick && button == wxMOUSE_BTN_LEFT) {
2805
        // save paste location
2812
        // save paste location
2806
        pastex = x;
2813
        pastex = x;
Lines 2870-2875 void PatternView::OnMouseDown(wxMouseEvent& event) Link Here
2870
2877
2871
void PatternView::OnMouseUp(wxMouseEvent& event)
2878
void PatternView::OnMouseUp(wxMouseEvent& event)
2872
{
2879
{
2880
    // if the button released was not the first held down then ignore
2881
    int button = event.GetButton();
2882
    if (button != whichbuttondown) return;
2883
2884
    // same button released so process
2885
    mouseisdown = false;
2886
2873
    if (drawingcells || selectingcells || movingview || clickedcontrol > NO_CONTROL) {
2887
    if (drawingcells || selectingcells || movingview || clickedcontrol > NO_CONTROL) {
2874
        StopDraggingMouse();
2888
        StopDraggingMouse();
2875
    } else if (mainptr->draw_pending) {
2889
    } else if (mainptr->draw_pending) {
Lines 3273-3278 PatternView::PatternView(wxWindow* parent, wxCoord x, wxCoord y, int wd, int ht, Link Here
3273
    selectingcells = false;    // not selecting cells
3287
    selectingcells = false;    // not selecting cells
3274
    movingview = false;        // not moving view
3288
    movingview = false;        // not moving view
3275
    waitingforclick = false;   // not waiting for user to click
3289
    waitingforclick = false;   // not waiting for user to click
3290
    mouseisdown = false;       // mouse button is not down
3276
    nopattupdate = false;      // enable pattern updates
3291
    nopattupdate = false;      // enable pattern updates
3277
    showcontrols = false;      // not showing translucent controls
3292
    showcontrols = false;      // not showing translucent controls
3278
    oldcursor = NULL;          // for toggling cursor via shift key
3293
    oldcursor = NULL;          // for toggling cursor via shift key
(-)a/gui-wx/wxview.h (+2 lines)
Lines 102-107 public: Link Here
102
    bool movingview;              // moving view due to dragging mouse?
102
    bool movingview;              // moving view due to dragging mouse?
103
    bool nopattupdate;            // disable pattern updates?
103
    bool nopattupdate;            // disable pattern updates?
104
    bool showcontrols;            // draw translucent controls?
104
    bool showcontrols;            // draw translucent controls?
105
    bool mouseisdown;             // mouse button held down?
106
    int whichbuttondown;          // which mouse button is down
105
    wxRect controlsrect;          // location of translucent controls
107
    wxRect controlsrect;          // location of translucent controls
106
    wxRect pasterect;             // area to be pasted
108
    wxRect pasterect;             // area to be pasted
107
    wxCursor* oldcursor;          // non-NULL if shift key has toggled cursor
109
    wxCursor* oldcursor;          // non-NULL if shift key has toggled cursor

Return to bug 661360