FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

incorporate Mode fix from Joel (issue #2615) · GoToLoop/processing@bcdac57 · GitHub

Repository navigation

Commit bcdac57

Browse files
committed
incorporate Mode fix from Joel (issue processing#2615)
1 parent 658a594 commit bcdac57

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

‎app/src/processing/app/Editor.java‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,13 @@ protected void initModeMenu() {
389389
JRadioButtonMenuItem item = new JRadioButtonMenuItem(m.getTitle());
390390
item.addActionListener(new ActionListener() {
391391
public void actionPerformed(ActionEvent e) {
392-
base.changeMode(m);
393-
if (sketch.isModified()) {
392+
if (!sketch.isModified()) {
393+
base.changeMode(m);
394+
395+
} else {
396+
// Re-select the old checkbox, because it was automatically
397+
// updated by Java, even though the Mode could not be changed.
398+
// https://github.com/processing/processing/issues/2615
394399
for (Component c : modeMenu.getPopupMenu().getComponents()) {
395400
if (c instanceof JRadioButtonMenuItem) {
396401
if (((JRadioButtonMenuItem)c).getText() == mode.getTitle()) {

‎build/shared/revisions.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ in-progress Google Summer of Code projects and others:
6363
+ Add preference to set the present color
6464
https://github.com/processing/processing/pull/2568
6565

66+
+ Fix a problem where mode menu selection would change even if
67+
the change was canceled due to the sketch being modified
68+
https://github.com/processing/processing/issues/2615
69+
6670

6771
[ more bug fixes ]
6872

‎todo.txt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ X contrib properties files ignored in favor of contributions.txt from p5.org
2020
X https://github.com/processing/processing/issues/2572
2121
X tweak mode integrated
2222
X https://github.com/processing/processing/pull/2624
23+
X wrong mode selected if sketch is modified (checkbox changes)
24+
X https://github.com/processing/processing/issues/2615
2325

2426
pulls
2527
X Implementation of a list of open sketches in the Sketch menu

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL