File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
arduino-ide-extension/src/browser/contributions Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import {
29
29
CoreService ,
30
30
} from '../../common/protocol' ;
31
31
import { nls } from '@theia/core/lib/common' ;
32
+ import { unregisterSubmenu } from '../menu/arduino-menus' ;
32
33
33
34
@injectable ( )
34
35
export abstract class Examples extends SketchContribution {
@@ -120,6 +121,11 @@ export abstract class Examples extends SketchContribution {
120
121
const { label } = sketchContainerOrPlaceholder ;
121
122
submenuPath = [ ...menuPath , label ] ;
122
123
this . menuRegistry . registerSubmenu ( submenuPath , label , subMenuOptions ) ;
124
+ this . toDispose . push (
125
+ Disposable . create ( ( ) =>
126
+ unregisterSubmenu ( submenuPath , this . menuRegistry )
127
+ )
128
+ ) ;
123
129
sketches . push ( ...sketchContainerOrPlaceholder . sketches ) ;
124
130
children . push ( ...sketchContainerOrPlaceholder . children ) ;
125
131
} else {
You can’t perform that action at this time.
0 commit comments