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 |