File tree 1 file changed +6
-2
lines changed
arduino-ide-extension/src/browser/dialogs/settings
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,9 @@ import {
15
15
FileSystemExt ,
16
16
Network ,
17
17
} from '../../../common/protocol' ;
18
- import { nls } from '@theia/core/lib/common' ;
18
+ import { CommandService , nls } from '@theia/core/lib/common' ;
19
19
import { AsyncLocalizationProvider } from '@theia/core/lib/common/i18n/localization' ;
20
+ import { ElectronCommands } from '@theia/core/lib/electron-browser/menu/electron-menu-contribution' ;
20
21
21
22
export const EDITOR_SETTING = 'editor' ;
22
23
export const FONT_SIZE_SETTING = `${ EDITOR_SETTING } .fontSize` ;
@@ -82,6 +83,9 @@ export class SettingsService {
82
83
@inject ( AsyncLocalizationProvider )
83
84
protected readonly localizationProvider : AsyncLocalizationProvider ;
84
85
86
+ @inject ( CommandService )
87
+ protected commandService : CommandService ;
88
+
85
89
protected readonly onDidChangeEmitter = new Emitter < Readonly < Settings > > ( ) ;
86
90
readonly onDidChange = this . onDidChangeEmitter . event ;
87
91
protected readonly onDidResetEmitter = new Emitter < Readonly < Settings > > ( ) ;
@@ -282,7 +286,7 @@ export class SettingsService {
282
286
} else {
283
287
window . localStorage . setItem ( nls . localeId , currentLanguage ) ;
284
288
}
285
- window . location . reload ( ) ;
289
+ this . commandService . executeCommand ( ElectronCommands . RELOAD . id ) ;
286
290
}
287
291
288
292
return true ;
You can’t perform that action at this time.
0 commit comments