🐛 Fix restore saved version keeps view-only (#9514)

* 🐛 Fix restore saved verrsion keeps view-only

* 📎 Remove outdated note from CHANGES.md

Remove note about restoring saved version from Preview mode.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>

---------

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
Co-authored-by: Andrey Antukh <niwi@niwi.nz>
This commit is contained in:
Pablo Alba 2026-05-12 10:32:12 +02:00 committed by GitHub
parent c394a281c8
commit 269edcd0ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -25,7 +25,6 @@
- Fix copy and paste actions crashing the workspace on insecure origins (plain HTTP / non-`localhost`) where the Clipboard API is unavailable (by @MilosM348) [Github #6514](https://github.com/penpot/penpot/issues/6514)
- Fix blend-mode dropdown leaving the canvas rendered with the last hover-preview blend mode when dismissed without selecting an option; the WASM render is now reverted to the saved blend mode on pointer-leave (by @edwin-rivera-dev) [Github #XXXX](https://github.com/penpot/penpot/issues/XXXX)
## 2.16.0 (Unreleased)
### :boom: Breaking changes & Deprecations
@ -156,7 +155,7 @@
### :sparkles: New features & Enhancements
- Add MCP server integration [Github #9174](https://github.com/penpot/penpot/issues/9174)
- Add MCP server integration [Github #9174](https://github.com/penpot/penpot/issues/9174)
- Add chunked upload API for large media and binary files (removes previous upload size limits) [Github #8909](https://github.com/penpot/penpot/pull/8909)
- Improve team name validation [Github #9176](https://github.com/penpot/penpot/pull/9176)

View File

@ -180,6 +180,12 @@
[id]
(assert (uuid? id) "expected valid uuid for `id`")
(ptk/reify ::restore-version
ptk/UpdateEvent
(update [_ state]
;; Clear preview state if we're restoring from preview mode
(-> state
(update :workspace-versions dissoc :backup)
(update :workspace-global dissoc :read-only? :preview-id)))
ptk/WatchEvent
(watch [_ state _]
(let [file-id (:current-file-id state)]