Hi,
I wrote a few lines of code to allow a selection contour (very useful command) by double-clicking on entity (except for texts and blocks): it's like the SketchUp selection where double-click extends the selection to the nearest elements and triple-click to all connected entities.
Maybe someone other than me could like it.
The script consists of few lines added in DefaultAction.js e in SelectContour.js. You can find it (well marked in comments) in the attached files.
I'm not a expert on coding and I'm trying some little work on QCAD scripts. I hope it's not inappropriate.
Bye
Double-click to select contour
Moderators: andrew, Husky, J-J
Double-click to select contour
- Attachments
-
- SelectContour.js
- (4.63 KiB) Downloaded 825 times
-
- DefaultAction.js
- (23.11 KiB) Downloaded 835 times
Re: Double-click to select contour
Excellent idea, thanks. I've integrated this into the master branch. The affected files are:
https://github.com/qcad/qcad/blob/maste ... tAction.js
https://github.com/qcad/qcad/blob/maste ... Contour.js
https://github.com/qcad/qcad/blob/maste ... cesPage.ui
I've taken the liberty to refactor SelectContour a bit to avoid the need for SelectContour.prototype.entityDoubleClickEvent.
I've also added support for shift-double-click to add a contour to the current selection (or remove from current selection).
Please let me know under what name or pseudonym I can credit you in the about dialog (currently as 'marzof'):
https://github.com/qcad/qcad/blob/maste ... Credits.js
To keep up backwards-compatibility, this new behavior is optional and can be controlled through:
Edit > Application Preferences > Graphics View > Behavior > Double-click to select contour
https://github.com/qcad/qcad/blob/maste ... tAction.js
https://github.com/qcad/qcad/blob/maste ... Contour.js
https://github.com/qcad/qcad/blob/maste ... cesPage.ui
I've taken the liberty to refactor SelectContour a bit to avoid the need for SelectContour.prototype.entityDoubleClickEvent.
I've also added support for shift-double-click to add a contour to the current selection (or remove from current selection).
Please let me know under what name or pseudonym I can credit you in the about dialog (currently as 'marzof'):
https://github.com/qcad/qcad/blob/maste ... Credits.js
To keep up backwards-compatibility, this new behavior is optional and can be controlled through:
Edit > Application Preferences > Graphics View > Behavior > Double-click to select contour
Re: Double-click to select contour
Great!
Please take all the liberty you need to get a better code.
Also the idea to support the shift-double-click is very useful.
For the credits my name is Marco Ferrara
Bye
Please take all the liberty you need to get a better code.
Also the idea to support the shift-double-click is very useful.
For the credits my name is Marco Ferrara
Bye
Re: Double-click to select contour
OK, thanks. I've updated the credits in the about dialog accordingly.
Re: Double-click to select contour
very nice
the double-click works too, editing Layernames
Thanks
the double-click works too, editing Layernames
Thanks