[mapguide-commits] r6950 - branches/2.4/MgDev/Desktop/MapViewer

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Aug 23 05:08:14 PDT 2012


Author: jng
Date: 2012-08-23 05:08:14 -0700 (Thu, 23 Aug 2012)
New Revision: 6950

Modified:
   branches/2.4/MgDev/Desktop/MapViewer/MgMapViewer.cs
Log:
mg-desktop: Do this better, don't handle *any* mouse events if the viewer is busy.

Modified: branches/2.4/MgDev/Desktop/MapViewer/MgMapViewer.cs
===================================================================
--- branches/2.4/MgDev/Desktop/MapViewer/MgMapViewer.cs	2012-08-23 12:03:39 UTC (rev 6949)
+++ branches/2.4/MgDev/Desktop/MapViewer/MgMapViewer.cs	2012-08-23 12:08:14 UTC (rev 6950)
@@ -2222,33 +2222,39 @@
 
         private void OnMapMouseDown(object sender, MouseEventArgs e)
         {
+            if (IsBusy) return;
             HandleMouseDown(e);
         }
 
         private void OnMapMouseMove(object sender, MouseEventArgs e)
         {
+            if (IsBusy) return;
             HandleMouseMove(e);
         }
         
         private void OnMapMouseUp(object sender, MouseEventArgs e)
         {
+            if (IsBusy) return;
             HandleMouseUp(e);
         }
 
         private void OnMapMouseWheel(object sender, MouseEventArgs e)
         {
+            if (IsBusy) return;
             this.Focus();
             HandleMouseWheel(e);
         }
 
         private void OnMapMouseClick(object sender, MouseEventArgs e)
         {
+            if (IsBusy) return;
             this.Focus();
             HandleMouseClick(e);
         }
 
         private void OnMapMouseDoubleClick(object sender, MouseEventArgs e)
         {
+            if (IsBusy) return;
             this.Focus();
             HandleMouseDoubleClick(e);
         }
@@ -2641,7 +2647,7 @@
 
             if (this.ActiveTool == MapActiveTool.Pan || this.ActiveTool == MapActiveTool.Select || this.ActiveTool == MapActiveTool.ZoomIn)
             {
-                if (e.Location != dragStart && !isDragging && e.Button == MouseButtons.Left && !IsBusy)
+                if (e.Location != dragStart && !isDragging && e.Button == MouseButtons.Left)
                 {
                     isDragging = true;
                 }



More information about the mapguide-commits mailing list