diff --git a/modules/renderer/background.js b/modules/renderer/background.js index fc4fe994c1..89eabc3355 100644 --- a/modules/renderer/background.js +++ b/modules/renderer/background.js @@ -386,6 +386,7 @@ export function rendererBackground(context) { background.baseLayerSource( background.findSource(requested) || best || + background.findSource(context.storage('background-last-used')) || background.findSource('Bing') || first || background.findSource('none') diff --git a/modules/ui/background.js b/modules/ui/background.js index d41bd9d240..9f572960f8 100644 --- a/modules/ui/background.js +++ b/modules/ui/background.js @@ -30,7 +30,7 @@ export function uiBackground(context) { var key = t('background.key'); var _customSource = context.background().findSource('custom'); - var _previousBackground; + var _previousBackground = context.background().findSource(context.storage('background-previous-last-used')); var _shown = false; var _backgroundList = d3_select(null); @@ -92,6 +92,8 @@ export function uiBackground(context) { d3_event.preventDefault(); _previousBackground = context.background().baseLayerSource(); + context.storage('background-previous-last-used', _previousBackground.id); + context.storage('background-last-used', d.id); context.background().baseLayerSource(d); _backgroundList.call(updateLayerSelections); document.activeElement.blur();