I have a GoView where I am handling the BackgroundSelectionDropped event, however I have noticed that this event is raised when a GoShape is dropped (from another palette - similar to the FLowGrammer) as well as when a shape is simply moved within the GoView.
Is there a way to determine if a shape has been added opposed to moved? I only need my code to execute if a new shape has been added to the GoView.
Thanks for the suggestion, but at the moment it doesn’t appear as though it is going to provide a solution.
I really need to be able to determine if an object has been added or moved from a GoView event. Our application loads/unloads multiple documents (in/out of the one GoView) and each time a document is loaded the changed event is raised (for the document) with e.Hint == GoLayer.InsertedObject evaluating to true as it renders and adds objects to the document - which in my case won't work as I only want/need to know about new objects added/inserted by the end user.
I'll keep trying and see if I can some up with a solution, if you think of anything please let me know.
The easiest way to tell is by looking at GoView.Tool to see if the current tool is of type GoToolDragging (or subtype). If it is, then the drag started in that GoView. If it isn’t, it must have started somewhere else.
You can check that in your GoView.BackgroundSelectionDropped event handler or GoView.ObjectSelectionDropped event handler or override of GoObject.OnSelectionDropped.
All of this information applies to both Web Forms and Win Forms.