less noise when setting zoom

This commit is contained in:
Benjamin Pasero
2016-10-07 10:38:29 +02:00
parent 39c9f26e4d
commit cb83b10321

View File

@@ -224,17 +224,12 @@ export abstract class BaseZoomAction extends Action {
target = ConfigurationTarget.WORKSPACE;
}
const applyZoom = (error?: Error) => {
const applyZoom = () => {
webFrame.setZoomLevel(level);
browser.setZoomLevel(level); // Ensure others can listen to zoom level changes
// Inform user
if (error) {
this.messageService.show(Severity.Error, error);
}
};
this.configurationEditingService.writeConfiguration(target, { key: BaseZoomAction.SETTING_KEY, value: level }).done(() => applyZoom(), error => applyZoom(error));
this.configurationEditingService.writeConfiguration(target, { key: BaseZoomAction.SETTING_KEY, value: level }).done(() => applyZoom(), error => applyZoom());
}
}