Skip to content

Commit 8738c92

Browse files
committed
don't allow breakpoints to be set on blank lines (fixes processing#3765)
1 parent e92ce12 commit 8738c92

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

core/todo.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ X line direction vectors are incorrectly transformed
3737
X https://github.com/processing/processing/issues/3779
3838
X Strokes in 3D PShapes are not properly connected
3939
X https://github.com/processing/processing/issues/3756
40+
X setting surface properties hangs OpenGL sketches
41+
X https://github.com/processing/processing/issues/3789
4042

4143
jakub
4244
X FX - fix transformation stack NPE
@@ -110,7 +112,6 @@ _ update wiki/docs to say "don't override sketchXxxx() methods"
110112
_ SVG only exports last frame
111113
_ possibly because Java2D is disposing the Graphics2D in between?
112114
_ https://github.com/processing/processing/issues/3753
113-
114115
_ selectInput/Output() is behind the drawing window (Windows)
115116
_ https://github.com/processing/processing/issues/3775
116117

java/src/processing/mode/java/Debugger.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,10 +477,15 @@ LineBreakpoint breakpointOnLine(LineID line) {
477477
*/
478478
synchronized void toggleBreakpoint(int lineIdx) {
479479
LineID line = editor.getLineIDInCurrentTab(lineIdx);
480+
int index = line.lineIdx();
480481
if (hasBreakpoint(line)) {
481-
removeBreakpoint(line.lineIdx());
482+
removeBreakpoint(index);
482483
} else {
483-
setBreakpoint(line.lineIdx());
484+
// Make sure the line contains actual code before setting the break
485+
// https://github.com/processing/processing/issues/3765
486+
if (editor.getLineText(index).trim().length() != 0) {
487+
setBreakpoint(index);
488+
}
484489
}
485490
}
486491

todo.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ X https://github.com/processing/processing/issues/3786
1717
X confusion when // tweak is used
1818
X https://github.com/processing/processing/issues/3742
1919
X change to /// tweak instead
20+
X don't allow breakpoints to be set on blank lines
21+
X https://github.com/processing/processing/issues/3765
2022

2123
jakub
2224
X Error/warning location visualisation not updating when editor resizes
@@ -67,6 +69,7 @@ _ https://github.com/processing/processing/issues/3543
6769
_ move to javapackager or another option?
6870
_ http://www.excelsiorjet.com/kb/35/howto-create-a-single-exe-from-your-java-application
6971
_ mouse events (i.e. toggle breakpoint) seem to be firing twice
72+
_ non-standard cursor images used for OpenGL
7073

7174

7275
3.0 final
@@ -113,8 +116,6 @@ _ add this to the preferences?
113116

114117

115118
gui
116-
_ don't allow breakpoints to be set on blank lines
117-
_ https://github.com/processing/processing/issues/3765
118119
_ different design of squiggly line?
119120
_ build custom scroll bar since the OS versions are so ugly?
120121
_ error/warning location is awkward when no scroll bar is in use

0 commit comments

Comments
 (0)