Select to view content in your preferred language

Navigating a map with mouse wheel while add-in tool is active reverts to Explore tool

544
2
07-28-2022 12:54 PM
TimWhiteaker
Frequent Contributor

In Pro 3.0.0, I created an add-in following Build a map identification tool tutorial.  In a map in Pro, when I click on the custom tool to activate it, it is active.  Then if I scroll or click and drag with the mouse wheel to navigate in the map, the active tool reverts to being the Explore tool.  In Pro 2.x, if I navigated with the mouse wheel, the currently active tool would remain active.  I prefer the 2.x behavior.  Can I make Pro 3.0 keep my current tool active after navigating with the mouse wheel?

0 Kudos
2 Replies
Wolf
by Esri Regular Contributor
Esri Regular Contributor

I was able to duplicate this issue.  It is a bug.  I also noticed that when you change this line in the constructor from this:

SketchOutputMode = SketchOutputMode.Screen;

to this:

SketchOutputMode = SketchOutputMode.Map;

This will limit your tool to Maps only it will not work on Scenes (3 D), however, the active tool doesn't switch to the Explore tool anymore.

0 Kudos
TimWhiteaker
Frequent Contributor

That is a nice workaround as long as one doesn't need the tool to work in Scenes. I noticed what is perhaps another bug related to the workaround. There are different click behaviors for these situations:

When SketchOutputMode = SketchOutputMode.Map, you click once to start the sketch, drag to draw the shape, and click again to end the sketch.

When SketchOutputMode = SketchOutputMode.Screen, you click once to start the sketch and keep the mouse button held down, drag to draw the shape, and then release the mouse button to end the sketch.

0 Kudos