@@ -2559,8 +2559,6 @@ protected void applyPreferences() {
25592559
25602560 public String [] baseCode ;
25612561
2562- final static int SPACE_AMOUNT = 0 ;
2563-
25642562 UDPTweakClient tweakClient ;
25652563
25662564
@@ -2575,7 +2573,7 @@ public void stopInteractiveMode(List<List<Handle>> handles) {
25752573 getJavaTextArea ().stopInteractiveMode ();
25762574
25772575 // remove space from the code (before and after)
2578- removeSpacesFromCode ();
2576+ // removeSpacesFromCode();
25792577
25802578 // check which tabs were modified
25812579 boolean modified = false ;
@@ -2624,9 +2622,8 @@ public void stopInteractiveMode(List<List<Handle>> handles) {
26242622 // save the sketch
26252623 try {
26262624 sketch .save ();
2627- }
2628- catch (IOException e ) {
2629- Base .showWarning ("Tweak Mode" , "Could not save the modified sketch!" , e );
2625+ } catch (IOException e ) {
2626+ Base .showWarning ("Error" , "Could not save the modified sketch." , e );
26302627 }
26312628
26322629 // repaint the editor header (show the modified tabs)
@@ -2665,16 +2662,9 @@ static private boolean[] getModifiedTabs(List<List<Handle>> handles) {
26652662 public void initBaseCode () {
26662663 SketchCode [] code = sketch .getCode ();
26672664
2668- String space = new String ();
2669-
2670- for (int i =0 ; i <SPACE_AMOUNT ; i ++) {
2671- space += "\n " ;
2672- }
2673-
26742665 baseCode = new String [code .length ];
26752666 for (int i = 0 ; i < code .length ; i ++) {
26762667 baseCode [i ] = new String (code [i ].getSavedProgram ());
2677- baseCode [i ] = space + baseCode [i ] + space ;
26782668 }
26792669 }
26802670
@@ -2728,19 +2718,21 @@ private void loadSavedCode() {
27282718 }
27292719
27302720
2721+ /*
27312722 private void removeSpacesFromCode() {
27322723 SketchCode[] code = sketch.getCode();
27332724 for (int i=0; i<code.length; i++) {
27342725 String c = code[i].getProgram();
2735- c = c .substring (SPACE_AMOUNT , c .length () - SPACE_AMOUNT );
2726+ // c = c.substring(SPACE_AMOUNT, c.length() - SPACE_AMOUNT);
27362727 code[i].setProgram(c);
2737- /* Wild Hack: set document to null so the text editor will refresh
2738- the program contents when the document tab is being clicked */
2728+ // TODO Wild Hack: set document to null so the text editor will refresh
2729+ // the program contents when the document tab is being clicked
27392730 code[i].setDocument(null);
27402731 }
27412732 // this will update the current code
27422733 setCode(sketch.getCurrentCode());
27432734 }
2735+ */
27442736
27452737
27462738 /**
0 commit comments