]> Shamusworld >> Repos - ttedit/commitdiff
Fixed middle drag scrolling, restructured mouse loop a bit
authorShamus Hammons <jlhamm@acm.org>
Sun, 31 Aug 2008 13:55:10 +0000 (13:55 +0000)
committerShamus Hammons <jlhamm@acm.org>
Sun, 31 Aug 2008 13:55:10 +0000 (13:55 +0000)
src/editwindow.cpp

index 34b1a06c59c5e15a7065e6d7b6d788d079a06de4..667f75248e33d8112030a9f5a3796d5cce5368b7 100755 (executable)
@@ -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;
        }