This patch does quite big changes to Image Size dialog, so I would like
you to review and test it. The original bug it fixes is:
1) Create an image 3000x2000 @ 200ppi
2) Open Image Size dialog
3) You'll see the size 2999x1999
It happened due to the cyclic updates in a chain
Pixel Size->Print Size->Pixel Size and the rounding that
happened during it.
The patch introduces the following fixes:
1) The patch uses KisAspectRatioLocker and
KisAcyclicSignalConnector which break update loop
that caused these rounding errors.
2) The patch removed double-boxes for choosing units. Now the
user can select the unit by clicking on a single combo box.
3) Fixes Maximum/Minimum updates of the print size fields. They
depend on the current resolution, and it was never handled
properly.
4) Fixes the number of decimals and single step size for the
Pixel Size fields. They should vary depending on the current unit.
5) Add a feedback aout locked Print Size aspect ratio when the print
size is modified separately.
A list of utility commits:
* Implement "Coordinated Acyclic Connectors"
Coordinated acyclic connectors allow the user to create a group
of signal connections that block each other and forbid recursive
signal calls.
* Fix KisAspectRatioLocker to handle Unit spin boxes correctly
value() and setValue() calls in QDoubleSpinBox are *not* virtual!
In SliderWrapper we basically implement 'vtable' functionality,
but it was implemented in an incorrect way: the pointers should be
type-cast in a ascending inheritance order.