mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-08 20:06:32 +00:00
ATL-1195: Show all libraries if no board selected.
Like for the examples, we show all libraries if no board is selected, or the platform for the selected board is not installed. Otherwise, we show the libs for the current board. Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
parent
68af4c38fe
commit
cb2ef78c0a
@ -74,10 +74,9 @@ export class IncludeLibrary extends SketchContribution {
|
||||
this.mainMenuManager.update();
|
||||
const libraries: LibraryPackage[] = []
|
||||
const fqbn = this.boardsServiceClient.boardsConfig.selectedBoard?.fqbn;
|
||||
// Do not show board specific examples, when no board is selected.
|
||||
if (fqbn) {
|
||||
libraries.push(...await this.libraryService.list({ fqbn }));
|
||||
}
|
||||
// Show all libraries, when no board is selected.
|
||||
// Otherwise, show libraries only for the selected board.
|
||||
libraries.push(...await this.libraryService.list({ fqbn }));
|
||||
|
||||
const includeLibMenuPath = [...ArduinoMenus.SKETCH__UTILS_GROUP, '0_include'];
|
||||
// `Add .ZIP Library...`
|
||||
|
Loading…
x
Reference in New Issue
Block a user