add patch for Play Button not working (issue #688)

This commit is contained in:
Ben Fry
2013-02-03 11:29:58 -05:00
parent 063e66eb36
commit ad38b7d796
2 changed files with 8 additions and 9 deletions
+6 -5
View File
@@ -310,7 +310,6 @@ public abstract class EditorToolbar extends JComponent implements MouseInputList
int x = e.getX();
int y = e.getY();
// if (currentRollover != -1) {
if (rollover != null) {
// if ((x > x1[currentRollover]) && (y > y1) &&
// (x < x2[currentRollover]) && (y < y2)) {
@@ -319,9 +318,9 @@ public abstract class EditorToolbar extends JComponent implements MouseInputList
return;
} else {
// setState(currentRollover, INACTIVE, true);
rollover.setState(INACTIVE, true);
// currentRollover = -1;
if (rollover.state == ROLLOVER) {
rollover.setState(INACTIVE, true);
}
rollover = null;
}
}
@@ -429,7 +428,9 @@ public abstract class EditorToolbar extends JComponent implements MouseInputList
// there is no more rollover, make sure that the rollover text goes away
// currentRollover = -1;
if (rollover != null) {
rollover.setState(INACTIVE, true);
if (rollover.state == ROLLOVER) {
rollover.setState(INACTIVE, true);
}
rollover = null;
}
}
+2 -4
View File
@@ -464,12 +464,11 @@ public class JavaEditor extends Editor {
public void handleRun() {
toolbar.activate(JavaToolbar.RUN);
new Thread(new Runnable() {
public void run() {
prepareRun();
try {
toolbar.activate(JavaToolbar.RUN);
runtime = jmode.handleRun(sketch, JavaEditor.this);
// System.out.println("runtime now " + runtime);
} catch (Exception e) {
@@ -481,12 +480,11 @@ public class JavaEditor extends Editor {
public void handlePresent() {
toolbar.activate(JavaToolbar.RUN);
new Thread(new Runnable() {
public void run() {
prepareRun();
try {
toolbar.activate(JavaToolbar.RUN);
runtime = jmode.handlePresent(sketch, JavaEditor.this);
} catch (Exception e) {
statusError(e);