simulton / QSchematic

A library that allows creating diagrams such as flowcharts or even proper engineering schematics within a Qt application.
https://simulton.com
MIT License
231 stars 60 forks source link

Wire Manager: Add ability to query wire indexes of first and last point #36

Open Tectu opened 1 year ago

Tectu commented 1 year ago

Extend the wire_manager::wire class to provide an easy way to retrieve the index of the first and the last point. Most likely this will boil down to an accessor for the index of the last point only as the index of the first point is by design always 0 (check this tho!).

This accessor should then be used in various places to ensure that only the first or the last point of a wire can be connected to a wire_manager::connectable. Maybe this should also apply for other wires (to form nets).