From 6a188a10918398e8e1f86799eba6e418a0caa2e9 Mon Sep 17 00:00:00 2001 From: chrisf Date: Thu, 5 Jul 2007 10:23:17 +0000 Subject: [PATCH] git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1101 993157c7-ee19-0410-b2c4-bb4e9862e678 --- ShpViewer/ShpViewForm.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ShpViewer/ShpViewForm.cs b/ShpViewer/ShpViewForm.cs index 92120254b2..25200eeb49 100644 --- a/ShpViewer/ShpViewForm.cs +++ b/ShpViewer/ShpViewForm.cs @@ -78,6 +78,8 @@ namespace ShpViewer vx = mapViewControl1.XScroll; vy = mapViewControl1.YScroll; + + mapViewControl1.Cursor = Cursors.NoMove2D; } }; @@ -85,8 +87,8 @@ namespace ShpViewer { if (e.Button == MouseButtons.Right) { - int dx = e.X - ux; - int dy = e.Y - uy; + int dx = ux - e.X; + int dy = uy - e.Y; mapViewControl1.XScroll = vx + dx / 24; mapViewControl1.YScroll = vy + dy / 24; @@ -95,6 +97,8 @@ namespace ShpViewer } }; + mapViewControl1.MouseUp += delegate { mapViewControl1.Cursor = Cursors.Default; }; + mapViewControl1.MouseClick += delegate( object sender, MouseEventArgs e ) { if( e.Button == MouseButtons.Left )