mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-28 04:54:13 +02:00
2f988e6e2c
Editing an element already in the user collection, saving, and closing the editor left the old thumbnail in the elements panel until the whole collection was reloaded. ElementsLocation::icon() serves the preview from two caches keyed by path+uuid -- ElementPictureFactory's in-memory picture cache and ElementsCollectionCache's on-disk SQLite cache -- and neither was ever told the file changed. QETElementEditor::toLocation() writes the new XML and returns; ElementsCollectionWidget::locationWasSaved() then refreshes the panel item, but it reads the icon through the same two stale caches, so the refresh was a no-op. slot_reloadElementDrawings() already shows the correct invalidation call for ElementPictureFactory; this wires the same pattern, plus a matching refresh of ElementsCollectionCache's row, into the save path itself. Fixes the preview half of #1004. The paste-cursor-jump half of that report is a live design disagreement between two recent commits from a different contributor and is written up separately rather than fixed here. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>