Behavior of SelectionChanged and SelectBoxFinal events

Description

A proposal had been made regarding the behavior of the SelectionChanged and SelectBoxFinal events. To summarize, the two events should be triggered independently of each other, and behave in a consistent manner independent of each other.

Regarding the SelectionChanged event, the following describes the current behavior, which will remain unchanged.

  • Both the cmSelection and cmSelectByPolygon tools are capable of selecting from a single layer (via the ChooseLayer event) or from multiple layers (based on the Shapefile.Selectable property).

  • Whether using the cmSelection or cmSelectByPolygon tool, if any shapes are ‘selected’, you will receive a SelectionChanged event for each layer containing ‘selected’ shapes.

Regarding the SelectBoxFinal event

  • If you set the Map.SendSelectBoxFinal property = True, then the SelectBoxFinal event should be raised any time you finish dragging a selection box on the screen. This currently applies to the both the cmZoomIn and cmSelection tools, and should not be dependent upon whether or not any shapes were actually ‘selected’ by the cmSelection tool.

  • This behavior differs slightly from what has been in place up through v4.9.x of MapWinGIS, for which the SelectBoxFinal event was only raised from the cmSelection tool if no shapes were ‘selected’ by the tool. It is more consistent to always raise the SelectBoxFinal event, whether or not any shapes were ‘selected’. The SelectionChanged event has been, and will continue to be raised first, and thus the programmer can decide within the SelectBoxFinal event whether or not any further action is necessary.

I believe these rules represent a simple and intuitive behavior, and result in a consistent and predictable programming paradigm.

Activity

Show:
Jerry Faust
March 22, 2019, 7:55 PM

Submitted on 2-22-2019, with details as follows:

Commit: c73587868719c9514817e0b03de339202a828459
Parents: eecd2e67db
Author: Jerry Faust <jerryfaust1@gmail.com>
Date: Friday, February 22, 2019 9:09:09 AM
Committer: Jerry Faust

Submit SelectBoxFinal event following cmSelection tool, whether or not any shapes were 'selected'. Documentation has been updated accordingly.

Done

Assignee

Jerry Faust

Reporter

Jerry Faust

Fix versions