Skip to content

Commit

Permalink
Added a small fix that shuts down the sketch when initiating a new sk…
Browse files Browse the repository at this point in the history
…etch window or pressing stop.
  • Loading branch information
Luxapodular committed Aug 15, 2015
1 parent ee7cf87 commit b738f27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion runtime/src/jycessing/PAppletJythonDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
import processing.core.PApplet;
import processing.core.PConstants;
import processing.core.PImage;
import processing.core.PSurface;
import processing.event.KeyEvent;
import processing.event.MouseEvent;
import processing.opengl.PShader;
Expand Down Expand Up @@ -578,7 +579,9 @@ public void runAndBlock(final String[] args) throws PythonSketchError {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
frame.setVisible(true);
System.out.println("running");
surface.setVisible(true);
surface.setLocation(10,10);
int state = frame.getExtendedState();
state &= ~Frame.ICONIFIED;
frame.setExtendedState(state);
Expand Down
1 change: 1 addition & 0 deletions runtime/src/jycessing/mode/PyEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public String getCommentPrefix() {
public void internalCloseRunner() {
try {
sketchService.stopSketch();
sketchService.shutdown();
} catch (final SketchException e) {
statusError(e);
} finally {
Expand Down

0 comments on commit b738f27

Please sign in to comment.