Created attachment 139918 [details] Pictures and logs for bug description SUMMARY When selecting multiple gradients with Control+Click in resouce manager, not all of selected ones are deleted, and some unselected gradiets are deleted too. Pictures and logs are attached in archive. Version: 5.0.0-prealpha (git 25a39d7) Platform: Appimage, krita-5.0.0-prealpha-25a39d7-x86_64.appimage OS: Ubuntu 20.04 STEPS TO REPRODUCE 1. Delete ~/.local/share/krita for default krita state. 2. Start Krita, go to "Manage resources" window. 3. Select gradients as resource type. 4. (See attached 01_select.png) Click 1st gradient with LMB, second with Contol+LMB, third wiht Control+LMB. 5. Press "Delete resources" Button. OBSERVED RESULT (See attached 02_after_delete.png) Brush 1 and Brush 3 are deleted. (expected) Brush 2 is not deleted (not expected) Brush 5 is deleted (not expected) EXPECTED RESULT Only three selected brushes are removed, others are kept intact. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/948
Git commit cea038a42043feab0b23779c148004cd8cae5a5f by Lucid Sunlight. Committed on 26/07/2021 at 18:45. Pushed by rempt into branch 'master'. Delete resource by index from model, instead of selection index Deleting a resource with "Show deleted resources" disabled will update the proxy model and next index in selection now points at wrong item, collect resource ids first, and then fetch resource index from model by id instead. M +12 -3 plugins/extensions/resourcemanager/DlgResourceManager.cpp https://invent.kde.org/graphics/krita/commit/cea038a42043feab0b23779c148004cd8cae5a5f