mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
parent
c6642c1bd2
commit
1d74bb87ac
@ -1295,6 +1295,7 @@ public class Base {
|
||||
}
|
||||
|
||||
private static String priorPlatformFolder;
|
||||
private static boolean newLibraryImported;
|
||||
|
||||
public void onBoardOrPortChange() {
|
||||
BaseNoGui.onBoardOrPortChange();
|
||||
@ -1303,10 +1304,11 @@ public class Base {
|
||||
TargetPlatform tp = BaseNoGui.getTargetPlatform();
|
||||
if (tp != null) {
|
||||
String platformFolder = tp.getFolder().getAbsolutePath();
|
||||
if (priorPlatformFolder == null || !priorPlatformFolder.equals(platformFolder)) {
|
||||
if (priorPlatformFolder == null || !priorPlatformFolder.equals(platformFolder) || newLibraryImported) {
|
||||
pdeKeywords = new PdeKeywords();
|
||||
pdeKeywords.reload();
|
||||
priorPlatformFolder = platformFolder;
|
||||
newLibraryImported = false;
|
||||
for (Editor editor : editors) {
|
||||
editor.updateKeywords(pdeKeywords);
|
||||
}
|
||||
@ -1346,6 +1348,7 @@ public class Base {
|
||||
// Manager dialog is modal, waits here until closed
|
||||
|
||||
//handleAddLibrary();
|
||||
newLibraryImported = true;
|
||||
onBoardOrPortChange();
|
||||
rebuildImportMenu(Editor.importMenu);
|
||||
rebuildExamplesMenu(Editor.examplesMenu);
|
||||
@ -2303,6 +2306,7 @@ public class Base {
|
||||
// FIXME error when importing. ignoring :(
|
||||
} finally {
|
||||
// delete zip created temp folder, if exists
|
||||
newLibraryImported = true;
|
||||
FileUtils.recursiveDelete(tmpFolder);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user