Comment 0 for bug 1240455

Revision history for this message
su_v (suv-lp) wrote : trunk: extensions do not compatible with recent unit/viewbox changes (rev >= 12554)

Steps to reproduce:
1) launch current trunk (default prefs, default new document (no localized template))
2) apply 'Extensions > Render > Gear > Gear…' (default settings)
3) open 'File > Document Properties > Page' and change default units from 'px' to 'mm'
4) apply 'Extensions > Render > Gear > Gear…' again with same settings
5) apply it with units changed to 'mm'

Expected result:
Since the change of the default units by itself is not supposed to change the page size, the expected result is that the gear created in step 4 matches the one created in step 2

Actual result:
The gear created after changing the default units is much larger in scale, and not inserted in the center of the current viewport (visible canvas area) which matches the center of the page if following the 'steps to reproduce' exactly. Changing units to 'mm' in the Gear settings only results in a relative change, and does not match closer to the default units of the current document than the one created with default Gear setting ('px').

This is likely to affect many of the script-based extensions (and even internal ones, e.g. 'Extensions > Render > Grid > Grid…').

AFAIU the details on how page size, default units and drawing scale (viewBox) may be combined will vary depending on
- which template was used
- which version was used to create the file (existing documents)
- which changes (and in which order) have applied to document properties before applying the extension

Confirmed with r12693 on Ubuntu 12.10 and r12692 on OS X 10.7.5.

Based on tests with archived builds:
- STR not reproduced with rev <= 12553
- STR reproduced with rev >= 12554