On Fri, Feb 1, 2013 at 12:58 AM, Jody Garnett <[email protected]>wrote:

>  That would be a great bug report and patch :-) I do not think the
> limitation was intentional, but we will need to test to be sure.
>
> Yes I came to realize that it was not intentional.


> I have a small understanding of the snapping functionality performing a
> query against the other layers in order to pull in geometry to snap to.
> Where exactly it holds onto that information we will have to look into. It
> may be holding it in an "EditGeom" for each layer which would explain the
> check for Interaction.EDIT.
>
> By looking at the code, I see that the entry point for the snapping is the
function:
net.refractions.udig.tools.edit.support.EditUtils.getClosestSnapPoint()

There depending on the preference, certain locations are searched for
points close to the input.
In case of "All layers", apart from the EditBlackboard, all layers are
checked as well.
The current criteria is that the layer is visible, it's backed by a
FeatureSource and it's editable.
If the conditions are met, a normal feature collection is requested for the
snapping bbox,
so it doesn't really need the editable limitation.


But yeah try removing the limitation and test, perhaps with debugger, and
> then you can tell us how it works out!
>
> Yeah, I removed the limitation and no problems. It works fine as it should.
Naturally it's slower because it makes more getFeature requests, but it's
ok by me.

The thing is that some users might need the current behavior.
So do we make another option, like "All editable layers" for the current
behavior or it's not needed?

-Pana
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to