Resizing an image can't be undone
Reported version
3.0
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
- place an image
- double click to edit
- resize
- deselect image
- undo: the image is removed.
Expected: the original size is restored. [EDIT: actually, it is restored to a infinitely small (garbage) size]
This is somewhat related to issue #282862: Moving an image can't be undone, but instead is due to Image::endEditDrag reading garbage from ed.getData [EDIT: and casting it to ImageEditData]
Fix version
3.1.0
Comments
In reply to (No subject) by pbrenna
Regression No means it didn't work in version 2 either.
Yes. I can reproduce the bug both with the official Musescore 2.3.2 AppImage from the website, and with my self-built musescore 2.3.2.
Talking about musescore 3, at image.cpp:414,
ed.getData(this)
should retrieve the "ImageEditData" object allocated at image.cpp:371, but it retrieves some other object.So i temporarily fixed that for my build with an ugly workaround; I verified that it receives the correct object; however, even when getting the correct object and invoking correctly score()->undoPropertyChanged, still "undo" makes the image disappear. This is not related to issue #283066: "Image" element anchored to measure disappears after save and reopen since that is a proper regression.
Just retested with the example file that is attached to #281716: Moving an image can't be undone. Undoing resizing works like a charm :)
Thus closing as fixed, which happened presumably in version 3.1.0 as per https://musescore.org/en/node/282862#comment-910775
Automatically closed -- issue fixed for 2 weeks with no activity.