Patch/patcher parenting bug


#1

I found something which doesn't seem right.
If you create a patch/patcher object, then create any object in that patcher, then parent one of the controls, test the main patch, all works. If you then go back into the patch/patcher and delete the object that was parented, you can't run the main patch, it gives an error.

`C:\Users\MATTH_~1\DOCUME~1\axoloti/build/xpatch.cpp: In member function 'void rootc::instancepatcher__1::Init(rootc*)':
C:\Users\MATTH_~1\DOCUME~1\axoloti/build/xpatch.cpp:358:107: error: 'PARAM_INDEX_dial__1_value' is not a member of 'rootc::instancepatcher__1'
parent->PExch[PARAM_INDEX_patcher__1_dial__1].finalvalue = (int32_t)(&(parent->instancepatcher__1_i.PExch[instancepatcher__1::PARAM_INDEX_dial__1_value]));
^
make: *** [C:\Users\MATTH_~1\DOCUME~1\axoloti/build/xpatch.bin] Error 1
shell task failed, exit value: 1
Compiling patch failed ( untitled )

`
The ways around it are :
- de-parenting before deleting.
- adding back the parented objects you deleted, without parenting them (but you have to remember what they where)

or create a new patch/patcher object and put everything from the broken patch/patcher into the new one.

I'm sure it's just a small bug to iron out, but I had to talk about it, I keep on falling on it.


#2

Yes I have noticed that too. Just couldnt figure out what it ment. I also noticed that if you by mistake save while the patcher object is being edited, the main patch wont go live.

But both of the problems(if I remember correct) can also usually be solved by cutting the object out of the patch and paste it in again. But it is not really a good solution, cause then you have to rewire the cables everytime you edited something.

But it also says "still under development". So will see what happens :smile:


#3

Thanks for the clear bug report, will look into it.


#4

fixed on github, next release...