From: Shamus Hammons Date: Sun, 31 Aug 2008 13:55:10 +0000 (+0000) Subject: Fixed middle drag scrolling, restructured mouse loop a bit X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=ttedit;a=commitdiff_plain;h=4cb6658a064af902858ea32e19c868f287d72a3b Fixed middle drag scrolling, restructured mouse loop a bit --- diff --git a/src/editwindow.cpp b/src/editwindow.cpp index 34b1a06..667f752 100755 --- a/src/editwindow.cpp +++ b/src/editwindow.cpp @@ -318,10 +318,9 @@ WriteLogMsg(" --> [# polys: %u, # points: %u]\n", pts.GetNumPolys(), pts.GetNumP app.toolPalette->Refresh(false); } - return; +// return; } - - if (e.MiddleIsDown()) + else if (e.MiddleIsDown()) { // Calc offset from previous point pt = e.GetPosition(); @@ -333,12 +332,13 @@ WriteLogMsg(" --> [# polys: %u, # points: %u]\n", pts.GetNumPolys(), pts.GetNumP // Otherwise, we would subtract both offsets! offsetX -= ptOffset.x, offsetY += ptOffset.y; Refresh(); +// ptPrevious = pt; - return; +// return; } -// if (e.LeftIsDown()) -// { + else if (e.LeftIsDown()) + { #if 0 if (tool == TOOLScroll) { @@ -367,12 +367,12 @@ WriteLogMsg(" --> [# polys: %u, # points: %u]\n", pts.GetNumPolys(), pts.GetNumP } else #endif - if (tool == TOOLAddPt || tool == TOOLAddPoly || tool == TOOLSelect) + if (tool == TOOLAddPt || tool == TOOLAddPoly || tool == TOOLSelect) { if (tool != TOOLAddPt || pts.GetNumPoints() > 0)//yecch. { //temporary, for testing. BTW, Select drag bug is here...! -#if 0 +#if 1 wxPoint pt2 = GetAdjustedMousePosition(e); pts.SetXY(ptHighlight, pt2.x, pt2.y); Refresh(); @@ -390,7 +390,7 @@ WriteLogMsg(" --> [# polys: %u, # points: %u]\n", pts.GetNumPolys(), pts.GetNumP Refresh(); } } -// } + } ptPrevious = pt; }