[trunk] Image::setProperty() rounds size and scale to integers
Context: trunk rev. 5511 compiled with Qt lib 4.8.0 under Win 7
Description:
The function Image::SetProperty()
(in file libmscore/image.cpp
, lines 147 and 150), for the P_SIZE and P_SCALE switch cases uses v.toSize()
rather than v.toSizeF()
, resulting in size and scale being rounded to integer values.
In most cases, this results in a distortion of the image; if the image is small (like for instance an ornament) and size is measured in spatia, this may result in image height or width being rounded to 0 and the image actually disappears.
The rounded size is then saved with the score (=> data corruption).
Note:
This applies both to images added to a score and to images added to palettes.
Marked critical as leads to data corruption.
Patch: The attached patch simply replaces toSize()
with toSizeF()
in the two above mentioned occurrences.
M.
Attachment | Size |
---|---|
trunk-image_cpp-image_size_forced_to_integer.patch | 652 bytes |
Comments
patch applied in r5551
Automatically closed -- issue fixed for 2 weeks with no activity.