Small spacing fixes like imports in separate lines
for more clarity, and the position of the license.
Also use the new `messages` module to provide
the functions to print text to the console.
Use two `DEBUG` variables to print information about
the `ToDo` class in order to see the scheduled commands
when the graphical commands are executed.
Small spacing fixes like imports in separate lines
for more clarity, and the position of the license.
Also use the new `messages` module to provide the functions
to print text to the console.
Small spacing fixes like imports in separate lines
for more clarity, and the position of the license.
Also use the new `messages` module to provide the functions
to print text to the console.
Small spacing fixes like imports in separate lines for
more clarity, and the position of the license.
Also use the class name `ToDo` in `CamelCase`,
as it is indicated in Python guidelines for classes.
==========================================================
Changes:
- Move multIcon structure to be internal to TaskSketcherElements class
- Change Caps to MultIcon for consistency
- Move tamperIcon from TaskSketcherElements to MultIcon struct
- Change tamperIcon method to be the constructor of MultIcon and change from struct to class
- Update the tamperIcon algorithm, so that only the point that is not marked in green as selected
is made pink.
Bug fix:
UpdateIcons and SlotElementsChanged are methods sharing code (they could benefit from a refactoring), but
they are conceptually different and are called in very different circumnstances.
UpdateIcons preserves selection. This means that one may select the stating point of line1, press z to switch
to edges, select the edge of line 2 and do a point on object constraint all without touching the 3D view.
SlotElementsChanged occurs when there are additions or removals in the number of geometry elements of the widget.
Warning:
This code requires QT 5.6 because of function pixelColour(int, int):
https://doc.qt.io/qt-5/qimage.html#pixelColor-1
Travis without QT5 complains with:
/home/travis/build/FreeCAD/FreeCAD/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp:1120:31: error: ‘class QImage’ has no member named ‘pixelColor’; did you mean ‘setColor’?