New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong mode shows as being selected in Mode Menu pop-up when trying to change mode with unsaved changes in sketch #2615

Closed
joelmoniz opened this Issue Jun 27, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@joelmoniz
Copy link
Member

joelmoniz commented Jun 27, 2014

When there are unsaved changes in the Sketch, and the user tries to change the mode, after the dialog that prompts the user to save unsaved changes appears, the Mode Menu popup shows the mode that the user tried to change to as the current mode, not the actual current mode.

Reproducing this issue:

  1. Create a new sketch with the following code (for example), don't save:
void setup() {
  size(200,200);
}

void draw() {
  rect(20,20,80,90);
}
  1. Try to change the mode, say from Java to JavaScript

  2. The dialog prompting the user to save unsaved changes appears, and the mode now shows as JavaScript, though the user is still on Java
@aengelke

This comment has been minimized.

Copy link
Contributor

aengelke commented Jun 27, 2014

This looks like a duplicate of #2586.

@joelmoniz

This comment has been minimized.

Copy link
Member

joelmoniz commented Jun 27, 2014

Not exactly. From what I can see, this happens because of the behavior of JRadioButtonMenuItem, where the item clicked on automatically gets selected, and not because of the file extension.

Here, a new window doesn't open, although the symptom of Python mode being selected in the Java window is similar (point number 4).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment