1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

When the cores or libraries list are empty, they get automatically updated

This commit is contained in:
Federico Fissore 2015-03-02 16:56:33 +01:00
parent 357d5954c3
commit 5989bb400d
2 changed files with 20 additions and 0 deletions

View File

@ -36,6 +36,7 @@ import cc.arduino.ui.InstallerJDialog;
import cc.arduino.ui.InstallerTableCell;
import cc.arduino.utils.Progress;
import javax.swing.*;
import java.awt.*;
import java.util.Collection;
@ -110,6 +111,15 @@ public class LibraryManagerUI extends InstallerJDialog {
setProgress(progress);
}
};
if (indexer.getIndex().getLibraries().isEmpty()) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
onUpdatePressed();
}
});
}
}
public void setProgress(Progress progress) {

View File

@ -36,6 +36,7 @@ import cc.arduino.ui.InstallerJDialog;
import cc.arduino.ui.InstallerTableCell;
import cc.arduino.utils.Progress;
import javax.swing.*;
import java.awt.*;
import java.util.Collection;
@ -108,6 +109,15 @@ public class ContributionManagerUI extends InstallerJDialog {
setProgress(progress);
}
};
if (indexer.getIndex().getPackages().isEmpty()) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
onUpdatePressed();
}
});
}
}
public void setProgress(Progress progress) {