Skip to content

Fix LVGL widget copy/paste serialization#1011

Open
song7641 wants to merge 1 commit into
eez-open:masterfrom
song7641:fix-lvgl-widget-copy-paste
Open

Fix LVGL widget copy/paste serialization#1011
song7641 wants to merge 1 commit into
eez-open:masterfrom
song7641:fix-lvgl-widget-copy-paste

Conversation

@song7641
Copy link
Copy Markdown

@song7641 song7641 commented Jun 2, 2026

Fixes LVGL widget copy/paste from the Widgets Structure panel.

The legacy action migration in Widget.beforeLoadHook was reading jsObject.action directly. During copy serialization, jsObject can still expose the Widget.action getter through the prototype, which triggers LVGL event lookup before the cloned object is attached to a Project root. That causes Project settings lookup to fail and prevents clipboard data from being written.

This change only migrates the legacy action field when it is an own property of the serialized object.

Verified:

  • LVGL widget Copy/Paste via context menu
  • LVGL widget Ctrl+C / Ctrl+V
  • npm run build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant