mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Fix notebook results grid settings not updating (#11413)
* added boolean for results grid settings changed * change parameter name to forceThemeUpdate
This commit is contained in:
@@ -20,19 +20,20 @@ export class NotebookThemingContribution extends Disposable implements IWorkbenc
|
|||||||
|
|
||||||
private hookNotebookThemesAndConfigListener(): void {
|
private hookNotebookThemesAndConfigListener(): void {
|
||||||
if (this.configurationService) {
|
if (this.configurationService) {
|
||||||
this.updateNotebookThemes();
|
this.updateNotebookThemes(false);
|
||||||
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
||||||
|
let affectsResultsGrid = e.affectsConfiguration('resultsGrid');
|
||||||
if (e.affectsConfiguration(OVERRIDE_EDITOR_THEMING_SETTING)
|
if (e.affectsConfiguration(OVERRIDE_EDITOR_THEMING_SETTING)
|
||||||
|| e.affectsConfiguration('resultsGrid')) {
|
|| affectsResultsGrid) {
|
||||||
this.updateNotebookThemes();
|
this.updateNotebookThemes(affectsResultsGrid);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateNotebookThemes() {
|
private updateNotebookThemes(forceThemeUpdate: boolean) {
|
||||||
let overrideEditorSetting = this.configurationService.getValue<boolean>(OVERRIDE_EDITOR_THEMING_SETTING);
|
let overrideEditorSetting = this.configurationService.getValue<boolean>(OVERRIDE_EDITOR_THEMING_SETTING);
|
||||||
if (overrideEditorSetting !== this.overrideEditorThemeSetting) {
|
if (overrideEditorSetting !== this.overrideEditorThemeSetting || forceThemeUpdate) {
|
||||||
// Re-add the participant since this will trigger update of theming rules, can't just
|
// Re-add the participant since this will trigger update of theming rules, can't just
|
||||||
// update something and ask to change
|
// update something and ask to change
|
||||||
if (this.themeParticipant) {
|
if (this.themeParticipant) {
|
||||||
|
|||||||
Reference in New Issue
Block a user