Skip to content

Commit 23f1b00

Browse files
committed
treat example sketches as Untitled (working on #548)'
1 parent 2bcee0c commit 23f1b00

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

app/src/processing/app/Base.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,9 +1698,9 @@ public Editor handleOpen(String path) {
16981698
* Examples window, because Modes like Python and Android do not have
16991699
* "sketch.properties" files in each example folder.
17001700
*/
1701-
public Editor handleOpen(String path, Mode mode) {
1701+
public Editor handleOpenExample(String path, Mode mode) {
17021702
nextMode = mode;
1703-
return handleOpenInternal(path, false);
1703+
return handleOpenInternal(path, true);
17041704
}
17051705

17061706

app/src/processing/app/ui/ExamplesFrame.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public void mouseClicked(MouseEvent e) {
117117
//if (node != null && node.isLeaf() && node.getPath().equals(selPath)) {
118118
if (node != null && node.isLeaf() && selRow != -1) {
119119
SketchReference sketch = (SketchReference) node.getUserObject();
120-
base.handleOpen(sketch.getPath(), mode);
120+
base.handleOpenExample(sketch.getPath(), mode);
121121
}
122122
}
123123
}
@@ -134,7 +134,7 @@ public void keyTyped(KeyEvent e) {
134134
(DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
135135
if (node != null && node.isLeaf()) {
136136
SketchReference sketch = (SketchReference) node.getUserObject();
137-
base.handleOpen(sketch.getPath(), mode);
137+
base.handleOpenExample(sketch.getPath(), mode);
138138
}
139139
}
140140
}

todo.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ X https://github.com/processing/processing4/issues/117
2828
X App was merged into processing.mode.java.lsp.PdeLanguageServer
2929

3030

31-
_ "Show Sketch Folder" for libraries needs to treat the sketch as Untitled
31+
_ "Show Sketch Folder" for library examples need to treat the sketch as Untitled
3232
_ and with that, switch to another directory
3333
_ https://github.com/processing/processing4/issues/548
3434

0 commit comments

Comments
 (0)