The intent for this change is to allow faster labeling when there
are streaks of the same label occasionally, but not consistently
enough to enable "default label" mode. With this PR the user can
simply click again to confirm the previous selection, without
having to aim for the OK button, or move either hand to the
ENTER button.
The alignment and position change of the buttons is for two reasons:
- it covers less of the drawn shape, easing verification of the
label to be selected
- the alignment wasn't taken into account for offset calculation.
It works if the dialog is shown, but that causes the dialog to
briefly flicker in the old position. Presumably an `adjustSize`
or similar is needed on more widgets, but I was unable to
figure out which.
* rename local variables in main file
* additional renaming of functions and variables
* Rename main file functions
* Rename functions and variables in canvas.py
* Rename functions and locals for remaining files
* Rename non-Qt derived class' members
* Rename members of Qt-derived classes
* Fix paint label issue
* Add item single click slot in labelDialog.py
In the original code, double clicking a list item will set the text property and automatically validate afterwards, with the label dialog window disappearing.
In this revised version, double click behavior is unchanged, while single click is added. When single clicking a list item, it will only set text in the QLineEdit. Users can change the text by clicking other items before validating themselves by clicking yes.