File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1120,6 +1120,7 @@ void ofxVisualProgramming::newTempPatchFromFile(string patchFile){
11201120void ofxVisualProgramming::preloadPatch (string patchFile){
11211121 currentPatchFile = patchFile;
11221122 tempPatchFile = currentPatchFile;
1123+
11231124 // clear previous patch
11241125 for (map<int ,shared_ptr<PatchObject>>::iterator it = patchObjects.begin (); it != patchObjects.end (); it++ ){
11251126 if (it->second ->getName () != " audio device" ){
@@ -1131,6 +1132,9 @@ void ofxVisualProgramming::preloadPatch(string patchFile){
11311132 }
11321133
11331134 it->second ->outPut .clear ();
1135+
1136+ glm::vec3 temp = canvas.screenToWorld (glm::vec3 (ofGetWindowWidth ()/2 ,ofGetWindowHeight ()/2 + 100 ,0 ));
1137+ it->second ->move (temp.x ,temp.y );
11341138 }
11351139 }
11361140 resetTime = ofGetElapsedTimeMillis ();
@@ -1142,6 +1146,9 @@ void ofxVisualProgramming::openPatch(string patchFile){
11421146
11431147 bLoadingNewPatch = true ;
11441148
1149+ // reset subpatch level
1150+ currentSubpatch = " root" ;
1151+
11451152 currentPatchFile = patchFile;
11461153 ofFile temp (currentPatchFile);
11471154 currentPatchFolderPath = temp.getEnclosingDirectory ();
You can’t perform that action at this time.
0 commit comments