Skip to content

Commit 2377d29

Browse files
committed
Use a new name as a prepend and ensure saved before opening
#206
1 parent 701d4d9 commit 2377d29

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

BowlerStudio

src/main/java/com/commonwealthrobotics/ProjectManager.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import com.neuronrobotics.bowlerstudio.SplashManager;
2727
import com.neuronrobotics.bowlerstudio.scripting.DownloadManager;
2828
import com.neuronrobotics.bowlerstudio.scripting.cadoodle.CaDoodleFile;
29+
import com.neuronrobotics.bowlerstudio.scripting.cadoodle.RandomStringFactory;
2930
import com.neuronrobotics.bowlerstudio.threed.BowlerStudio3dEngine;
3031
import com.neuronrobotics.sdk.common.Log;
3132

@@ -231,8 +232,9 @@ private void openProject(CaDoodleFile c) {
231232
File doodle = new File(target.getAbsolutePath() + DownloadManager.delim() + c.getSelf().getName());
232233

233234
CaDoodleFile nf = CaDoodleFile.fromFile(doodle, null, false);
234-
nf.setProjectName(c.getMyProjectName() + "_copy_" + index);
235+
nf.setProjectName(RandomStringFactory.getNextRandomName()+"_"+c.getMyProjectName() + "_copy_" + index);
235236
nf.setTimeCreated(System.currentTimeMillis());
237+
nf.save(true);
236238
ap.setActiveProject(doodle);
237239

238240

0 commit comments

Comments
 (0)