File tree 1 file changed +9
-3
lines changed
arduino-ide-extension/src/browser/boards
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -80,16 +80,16 @@ export class BoardsDataMenuUpdater implements FrontendApplicationContribution {
80
80
string ,
81
81
Disposable & { label : string }
82
82
> ( ) ;
83
+ let selectedValue = '' ;
83
84
for ( const value of values ) {
84
85
const id = `${ fqbn } -${ option } --${ value . value } ` ;
85
86
const command = { id } ;
86
- const selectedValue = value . value ;
87
87
const handler = {
88
88
execute : ( ) =>
89
89
this . boardsDataStore . selectConfigOption ( {
90
90
fqbn,
91
91
option,
92
- selectedValue,
92
+ selectedValue : value . value ,
93
93
} ) ,
94
94
isToggled : ( ) => value . selected ,
95
95
} ;
@@ -100,8 +100,14 @@ export class BoardsDataMenuUpdater implements FrontendApplicationContribution {
100
100
{ label : value . label }
101
101
)
102
102
) ;
103
+ if ( value . selected ) {
104
+ selectedValue = value . label ;
105
+ }
103
106
}
104
- this . menuRegistry . registerSubmenu ( menuPath , label ) ;
107
+ this . menuRegistry . registerSubmenu (
108
+ menuPath ,
109
+ `${ label } ${ selectedValue ? `: "${ selectedValue } "` : '' } `
110
+ ) ;
105
111
this . toDisposeOnBoardChange . pushAll ( [
106
112
...commands . values ( ) ,
107
113
Disposable . create ( ( ) =>
You can’t perform that action at this time.
0 commit comments