File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ ofxVisualProgramming::ofxVisualProgramming(){
6666 lastAddedObjectID = -1 ;
6767 bLoadingNewObject = false ;
6868 bLoadingNewPatch = false ;
69+ bPopulatingObjectsMap = false ;
6970 clearingObjectsMap = false ;
7071
7172 livePatchingObiID = -1 ;
@@ -225,7 +226,9 @@ void ofxVisualProgramming::update(){
225226 }
226227
227228 // Clear map from deleted objects
228- clearObjectsMap ();
229+ if (!bPopulatingObjectsMap){
230+ clearObjectsMap ();
231+ }
229232
230233 // update patch objects
231234 if (!bLoadingNewPatch && !patchObjects.empty ()){
@@ -1568,6 +1571,8 @@ void ofxVisualProgramming::loadPatch(string patchFile){
15681571 XML.popTag ();
15691572 }
15701573
1574+ bPopulatingObjectsMap = true ;
1575+
15711576 int totalObjects = XML.getNumTags (" object" );
15721577
15731578 if (totalObjects > 0 ){
@@ -1645,6 +1650,8 @@ void ofxVisualProgramming::loadPatch(string patchFile){
16451650 }
16461651 }
16471652
1653+ bPopulatingObjectsMap = false ;
1654+
16481655 activateDSP ();
16491656
16501657 }
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ class ofxVisualProgramming : public pdsp::Wrapper {
153153 int lastAddedObjectID;
154154 bool bLoadingNewObject;
155155 bool bLoadingNewPatch;
156+ bool bPopulatingObjectsMap;
156157 bool clearingObjectsMap;
157158
158159 // LOAD/SAVE
You can’t perform that action at this time.
0 commit comments