mirror of https://github.com/noisymime/Arduino.git
Clearing state of editor.status when hitting one of new/rename/delete context menu entries. Fixes #3720
This commit is contained in:
parent
fa78f718ce
commit
d304c45dd1
|
@ -93,8 +93,9 @@ public class EditorStatus extends JPanel {
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clearState() {
|
public void clearState() {
|
||||||
changeState(NOTICE);
|
changeState(NOTICE);
|
||||||
|
repaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void changeState(int newMode) {
|
private void changeState(int newMode) {
|
||||||
|
|
|
@ -131,6 +131,7 @@ public class Sketch {
|
||||||
* Handler for the New Code menu option.
|
* Handler for the New Code menu option.
|
||||||
*/
|
*/
|
||||||
public void handleNewCode() {
|
public void handleNewCode() {
|
||||||
|
editor.status.clearState();
|
||||||
// make sure the user didn't hide the sketch folder
|
// make sure the user didn't hide the sketch folder
|
||||||
ensureExistence();
|
ensureExistence();
|
||||||
|
|
||||||
|
@ -153,6 +154,7 @@ public class Sketch {
|
||||||
* Handler for the Rename Code menu option.
|
* Handler for the Rename Code menu option.
|
||||||
*/
|
*/
|
||||||
public void handleRenameCode() {
|
public void handleRenameCode() {
|
||||||
|
editor.status.clearState();
|
||||||
// make sure the user didn't hide the sketch folder
|
// make sure the user didn't hide the sketch folder
|
||||||
ensureExistence();
|
ensureExistence();
|
||||||
|
|
||||||
|
@ -430,6 +432,7 @@ public class Sketch {
|
||||||
* Remove a piece of code from the sketch and from the disk.
|
* Remove a piece of code from the sketch and from the disk.
|
||||||
*/
|
*/
|
||||||
public void handleDeleteCode() {
|
public void handleDeleteCode() {
|
||||||
|
editor.status.clearState();
|
||||||
// make sure the user didn't hide the sketch folder
|
// make sure the user didn't hide the sketch folder
|
||||||
ensureExistence();
|
ensureExistence();
|
||||||
|
|
||||||
|
@ -1223,8 +1226,6 @@ public class Sketch {
|
||||||
* Returns true if this is a read-only sketch. Used for the
|
* Returns true if this is a read-only sketch. Used for the
|
||||||
* examples directory, or when sketches are loaded from read-only
|
* examples directory, or when sketches are loaded from read-only
|
||||||
* volumes or folders without appropriate permissions.
|
* volumes or folders without appropriate permissions.
|
||||||
* @param librariesPaths
|
|
||||||
* @param examplesPath
|
|
||||||
*/
|
*/
|
||||||
public boolean isReadOnly(LibraryList libraries, String examplesPath) {
|
public boolean isReadOnly(LibraryList libraries, String examplesPath) {
|
||||||
String apath = data.getFolder().getAbsolutePath();
|
String apath = data.getFolder().getAbsolutePath();
|
||||||
|
|
Loading…
Reference in New Issue