studio icon indicating copy to clipboard operation
studio copied to clipboard

[Dashboard] SetVariable action will cause the original variable to be modified

Open dong-king opened this issue 7 months ago • 2 comments

Describe the bug

struct TREE_NODE:
{
    key: string,
    title: string,
    info: string
}

originalData and treeData are array:struct:TREE_NODE Use variable originalData to initialize treeData with SetVairable action. When the button is clicked, the info field of treeData is modified, and the info field of originalData is modified too.

Expected behavior originalData need remain unchanged.

Screenshots image

before clicking button: image

after clicking button: image

Desktop (please complete the following information):

  • OS: win10
  • eez-studio v0.13.0

dong-king avatar Jul 03 '24 11:07 dong-king