Quantcast
Channel: GMap.NET - Great Maps for Windows Forms & Presentation
Viewing all articles
Browse latest Browse all 3384

New Post: OnSelectionChange multiple fire when right click

$
0
0
Also I found a little bug happening in a specific condition. When a selection box has been drawn (using ALT + left mouse) the OnSelectionChanged event is raised in GMapControl.cs. However when the box is still drawn and you press and release the right button the OnSelectionChanged raises again. This is not wanted since the selection hasn't been changed. I solved this by making a little change in the OnMouseUp override.

Old Code:
         else
         {
#if !PocketPC
            if(e.Button == DragButton)
            {
               Core.mouseDown = GPoint.Empty;
            }

            if(!selectionEnd.IsEmpty && !selectionStart.IsEmpty)
            {
New Code:
         else
         {
#if !PocketPC
            if(e.Button == DragButton)
            {
               Core.mouseDown = GPoint.Empty;
                __Invalidate();__
                __return;__
            }

            if(!selectionEnd.IsEmpty && !selectionStart.IsEmpty)
            {

Viewing all articles
Browse latest Browse all 3384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>