I implemented touch-selection for the Sketcher

Merged, abandoned or rejected pull requests are moved here to clear the main Pull Requests forum.
Post Reply
Posts: 22
Joined: Mon May 29, 2017 11:29 pm

I implemented touch-selection for the Sketcher

Post by SparkyCola » Wed Oct 04, 2017 9:58 pm

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.

Posts: 5
Joined: Sat Aug 22, 2015 8:37 am

Re: I implemented touch-selection for the Sketcher

Post by RaNo » Fri May 18, 2018 8:57 pm

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?

Posts: 9136
Joined: Mon Dec 12, 2011 4:45 pm

Re: I implemented touch-selection for the Sketcher

Post by triplus » Sat May 19, 2018 8:39 am

I agree if this feature behavior would be further fine tuned in the future. That would be great.

Post Reply