Page 1 of 1

I implemented touch-selection for the Sketcher

Posted: Wed Oct 04, 2017 9:58 pm
by SparkyCola
Hi,
I added a feature that I call touch-selection to the Sketcher which already exists in the Part Design workbench. If you draw your selection rectangle from right to left, Sketcher will now select every object that is partly covered by the rectangle. This works very good for lines, good enough for all kinds of arcs, ellipses and circles (if the selection is too small it might not detect the "touch"). It also works in a limited way for splines, as it would be very complicated to check the actual curve, it is only checking the control points so far.
I basically just added some extra logic to the ViewProviderSketch.cpp some of them required a little change in the execution order of the existing code and that's it.
I successfully ran the 236 tests and created a pull-request. Travis CI confirms that.

Re: I implemented touch-selection for the Sketcher

Posted: Fri May 18, 2018 8:57 pm
by RaNo
Hey guys. Is it only me, or this new feature is cumbersome? When selecting, oftentimes it is more convenient to start dragging from the right rather than from the left. For instance if there are many other objects to the right, I would drag from the left, because by dragging from the right I could accidentally move those other objects.

I was used to the flexibility of the previous solution where I didn't have to think which side to drag from, and where I had the choice to drag from any side I want.

How about incorporating some option button, like "Ctrl", "Shift", or "Alt" to toggle the behavior of box selection, rather than relying on which side you start dragging from?

Re: I implemented touch-selection for the Sketcher

Posted: Sat May 19, 2018 8:39 am
by triplus
I agree if this feature behavior would be further fine tuned in the future. That would be great.