[Igarden-commit] Garden/source/PlanTool PlanTool.cpp, 1.20, 1.20.2.1 PlanTool.h, 1.9, 1.9.2.1
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2007-01-19 13:43:55
|
Update of /cvsroot/igarden/Garden/source/PlanTool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv22483 Modified Files: Tag: Release_branch_v1 PlanTool.cpp PlanTool.h Log Message: BUG: Sometimes missed dragEnd messages (when working quickly) Index: PlanTool.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/PlanTool.h,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** PlanTool.h 21 Jun 2006 02:39:08 -0000 1.9 --- PlanTool.h 19 Jan 2007 13:43:53 -0000 1.9.2.1 *************** *** 114,117 **** --- 114,118 ---- planPoint_t _mouseDownPos; bool _contentDown; + bool _dragging; planPoint_t _ContentMouseDownPos; UInt32 _clickCount; Index: PlanTool.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/PlanTool.cpp,v retrieving revision 1.20 retrieving revision 1.20.2.1 diff -C2 -d -r1.20 -r1.20.2.1 *** PlanTool.cpp 21 Jun 2006 02:39:08 -0000 1.20 --- PlanTool.cpp 19 Jan 2007 13:43:53 -0000 1.20.2.1 *************** *** 56,59 **** --- 56,60 ---- _ContentMouseDownPos.xOffset = 0; _ContentMouseDownPos.yOffset = 0; + _dragging = false; } *************** *** 86,116 **** _down = false; ! if(doubleClick) { ! _clickCount = 2; Click(view, point, _clickCount, NULL); } else { ! Point startPix, endPix; ! bool near; ! ! view->PlanPointToPortPixel(_mouseDownPos, startPix); ! view->PlanPointToPortPixel(point, endPix); ! near = (abs(startPix.h-endPix.h) < 4 && abs(startPix.v-endPix.v) < 4); ! if(near && (modifiers & KFastClick)) ! { ! if(doubleClick) ! { ! _clickCount = 2; ! } ! else ! _clickCount = 1; ! Click(view, point, _clickCount, NULL); ! } ! else ! { ! Drag(view, _mouseDownPos, point, kPtDragEnd, NULL); ! } } } --- 87,110 ---- _down = false; ! Point startPix, endPix; ! bool near; ! ! view->PlanPointToPortPixel(_mouseDownPos, startPix); ! view->PlanPointToPortPixel(point, endPix); ! near = (abs(startPix.h-endPix.h) < 4 && abs(startPix.v-endPix.v) < 4); ! if(!_dragging && near && (modifiers & KFastClick)) { ! if(doubleClick) ! { ! _clickCount = 2; ! } ! else ! _clickCount = 1; Click(view, point, _clickCount, NULL); } else { ! Drag(view, _mouseDownPos, point, kPtDragEnd, NULL); ! _dragging = false; } } *************** *** 152,156 **** --- 146,153 ---- { if(!view2->PlanPointsAreClose(_mouseDownPos, point)) + { + _dragging = true; Drag(view, _mouseDownPos, point, kPtDragIntermediate, NULL); + } } } |