| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2559,8 +2559,6 @@ protected void applyPreferences() { | |||
| 2559 | 2559 | ||
| 2560 | 2560 | public String[] baseCode; | |
| 2561 | 2561 | ||
| 2562 | - final static int SPACE_AMOUNT = 0; | ||
| 2563 | - | ||
| 2564 | 2562 | UDPTweakClient tweakClient; | |
| 2565 | 2563 | ||
| 2566 | 2564 | ||
@@ -2575,7 +2573,7 @@ public void stopInteractiveMode(List<List<Handle>> handles) { | |||
| 2575 | 2573 | getJavaTextArea().stopInteractiveMode(); | |
| 2576 | 2574 | ||
| 2577 | 2575 | // remove space from the code (before and after) | |
| 2578 | - removeSpacesFromCode(); | ||
| 2576 | + //removeSpacesFromCode(); | ||
| 2579 | 2577 | ||
| 2580 | 2578 | // check which tabs were modified | |
| 2581 | 2579 | boolean modified = false; | |
@@ -2624,9 +2622,8 @@ public void stopInteractiveMode(List<List<Handle>> handles) { | |||
| 2624 | 2622 | // save the sketch | |
| 2625 | 2623 | try { | |
| 2626 | 2624 | 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); | ||
| 2630 | 2627 | } | |
| 2631 | 2628 | ||
| 2632 | 2629 | // repaint the editor header (show the modified tabs) | |
@@ -2665,16 +2662,9 @@ static private boolean[] getModifiedTabs(List<List<Handle>> handles) { | |||
| 2665 | 2662 | public void initBaseCode() { | |
| 2666 | 2663 | SketchCode[] code = sketch.getCode(); | |
| 2667 | 2664 | ||
| 2668 | - String space = new String(); | ||
| 2669 | - | ||
| 2670 | - for (int i=0; i<SPACE_AMOUNT; i++) { | ||
| 2671 | - space += "\n"; | ||
| 2672 | - } | ||
| 2673 | - | ||
| 2674 | 2665 | baseCode = new String[code.length]; | |
| 2675 | 2666 | for (int i = 0; i < code.length; i++) { | |
| 2676 | 2667 | baseCode[i] = new String(code[i].getSavedProgram()); | |
| 2677 | - baseCode[i] = space + baseCode[i] + space; | ||
| 2678 | 2668 | } | |
| 2679 | 2669 | } | |
| 2680 | 2670 | ||
@@ -2728,19 +2718,21 @@ private void loadSavedCode() { | |||
| 2728 | 2718 | } | |
| 2729 | 2719 | ||
| 2730 | 2720 | ||
| 2721 | + /* | ||
| 2731 | 2722 | private void removeSpacesFromCode() { | |
| 2732 | 2723 | SketchCode[] code = sketch.getCode(); | |
| 2733 | 2724 | for (int i=0; i<code.length; i++) { | |
| 2734 | 2725 | 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); | ||
| 2736 | 2727 | 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 | ||
| 2739 | 2730 | code[i].setDocument(null); | |
| 2740 | 2731 | } | |
| 2741 | 2732 | // this will update the current code | |
| 2742 | 2733 | setCode(sketch.getCurrentCode()); | |
| 2743 | 2734 | } | |
| 2735 | + */ | ||
| 2744 | 2736 | ||
| 2745 | 2737 | ||
| 2746 | 2738 | /** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,6 +32,9 @@ | |||
| 32 | 32 | import processing.core.PGraphics; | |
| 33 | 33 | import processing.core.PImage; | |
| 34 | 34 | ||
| 35 | + | ||
| 36 | + // TODO replace this with {@link processing.app.ColorChooser} | ||
| 37 | + // https://github.com/processing/processing/issues/3209 | ||
| 35 | 38 | public class ColorSelector { | |
| 36 | 39 | int hue, saturation, brightness; | |
| 37 | 40 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments