Images added to palettes are lost on program restart
Issue type
UI bug
Bug description
If you use Ctrl+Shift drag to add an image from your score to a palette, then quit and restart MuseScore, the palette cell is present, but it appears empty, and attempting to add the image to a score produces zero-sized images that may lead to crashes.
Steps to reproduce
- copy an image to your clipboard by whatever means is available on your system
- make sure to have only one instance of MuseScore running
- select a note or rest in any score
- press Ctrl+V to add the image
- Ctrl+Shif+drag the image to a palette of your choice
- quit MuseScore
- restart MuseScore
- open any score
- open the palette you saved the image to
Result: the palette cell that formerly contained the image remains, but it looks empty. If you try to add that image to a score, it doesn't appear to work, although depending on whether you click it or use drag & drop, you may end up with a zero-sized image added.
Screenshots/Screen recordings
No response
MuseScore Version
OS: Debian GNU/Linux 11 (bullseye), Arch.: x86_64, MuseScore version (64-bit): 4.0.2-230690504, revision: github-musescore-musescore-dbe7c6d
Regression
Yes, this used to work in MuseScore 3.x and now is broken
Operating system
Debian 11
Additional context
If you explicitly save the palette by clicking the "..." and then Save palette, then load the palette into another instance, it works.
Hey @MarcSabatella, I just tried this process in the most recent nightly build and I'm not getting the behavior you're describing (although it was happening in an older build). Maybe it got fixed in the meantime? If so maybe it could be marked as fixed...
Also seems to be some weird discrepancy between debug and release builds - If in the future you get a build environment as debug compilation, check out this behavior: images don't seem to be showing up in the palettes at all after dragging them into it... and there's an ASSERT that as if forbades it. Kinda makes me wish the travis appimage building system also produced a debug appimage for testing...
I just tried following the steps @MarcSabatella gave above, and I still have the same issue. I can get the copied image back, but I have to first delete the custom palette it is in and then reload it.
Running Windows 11 Pro, My copy of Musescore tells me I'm running the latest version, but I need help finding out which version that is, precisely. I just checked it on August 25.
To see the version, use Help / About MuseScore.
For me, this is still reproducible with the current version(4.1.1) on Linux. And it's also still reproducible with the current nightly build, meaning I see no evidence it is fixed yet for an upcoming release either.
Ah, Thank you, Marc. I was looking in the wrong "About" on the Dropdown. To mark the spot, I'm on MuseScore version (64-bit): 4.1.1-232071203, revision: e4d1ddf @worldwideweary -- You wrote about images not showing up in the palettes after dragging them in. Two points from my experience: To drag an image into a palette, I find that I must first close and then reopen MuseScore and drag the image before doing anything else (other than opening a score, of course.) Second, the image does not show in the palette for me because I run in dark mode. The image is there; it's just also dark, so you can't see it against the dark background. Odd that this only happens with "outside" images. The images from the Master Palette (for example) display white in dark mode.
This is still an issue in 4.4.2, but I have discovered a workaround. If you paste the image into your score from the clipboard, and then copy to the palette from there, then it is indeed lost from the palette on restart. But, if you instead add the image to a frame via the Add menu, then add to the palette, it works correctly.
I assume the difference is that the pasted-in image has no filename for the palette to reference, but the added-in image does.