Closed uschmelmer closed 2 years ago
I also added comObject cloning.
Quick test (incl check with ETS) worked.
On cloning i add a empty Text to the ComObjRef, same as in the add-function:
cref.Text.Add(new Models.Translation(lang, ""));
cref.FunctionText.Add(new Models.Translation(lang, ""))
is this fine or do we need to copy something here?
Thank you.
If it is an auto comonjref i just add empty translations. So everything looks fine. I testet id and found a bug, but thats on me an i already found a fix for it.
I changed it to
comobj.Text = new ObservableCollection<Translation>(Text.ToList());
comobj.FunctionText = new ObservableCollection<Translation>(FunctionText.ToList());
Works also fine and less code :)
I changed it to
comobj.Text = new ObservableCollection<Translation>(Text.ToList()); comobj.FunctionText = new ObservableCollection<Translation>(FunctionText.ToList());
Works also fine and less code :)
It seems that this doesnt work, i copies just the reference but doesn't any deep copy. If you now change the Text in die Cloned element, it also changes the Text of the partent.
Yes you are right. I thought i testet it...
I added the option to clone existing parameters. Please review carefully, my first time on this project.
Cheers, Udo