Clearing state of editor.status when hitting one of new/rename/delete context menu entries. Fixes #3720

This commit is contained in:
Federico Fissore 2015-08-24 10:20:40 +02:00
parent fa78f718ce
commit d304c45dd1
2 changed files with 5 additions and 3 deletions

View File

@ -93,8 +93,9 @@ public class EditorStatus extends JPanel {
initialize();
}
private void clearState() {
public void clearState() {
changeState(NOTICE);
repaint();
}
private void changeState(int newMode) {

View File

@ -131,6 +131,7 @@ public class Sketch {
* Handler for the New Code menu option.
*/
public void handleNewCode() {
editor.status.clearState();
// make sure the user didn't hide the sketch folder
ensureExistence();
@ -153,6 +154,7 @@ public class Sketch {
* Handler for the Rename Code menu option.
*/
public void handleRenameCode() {
editor.status.clearState();
// make sure the user didn't hide the sketch folder
ensureExistence();
@ -430,6 +432,7 @@ public class Sketch {
* Remove a piece of code from the sketch and from the disk.
*/
public void handleDeleteCode() {
editor.status.clearState();
// make sure the user didn't hide the sketch folder
ensureExistence();
@ -1223,8 +1226,6 @@ public class Sketch {
* Returns true if this is a read-only sketch. Used for the
* examples directory, or when sketches are loaded from read-only
* volumes or folders without appropriate permissions.
* @param librariesPaths
* @param examplesPath
*/
public boolean isReadOnly(LibraryList libraries, String examplesPath) {
String apath = data.getFolder().getAbsolutePath();