diff --git a/js/id/ui/entity_editor.js b/js/id/ui/entity_editor.js index 411fbf6d3..53ba37c1b 100644 --- a/js/id/ui/entity_editor.js +++ b/js/id/ui/entity_editor.js @@ -120,6 +120,7 @@ iD.ui.EntityEditor = function(context) { .entityID(id)); function historyChanged() { + if (state === 'hide') return; var entity = context.hasEntity(id); if (!entity) return; entityEditor.preset(context.presets().match(entity, context.graph())); diff --git a/js/id/ui/inspector.js b/js/id/ui/inspector.js index bc604dc8a..9edefc73b 100644 --- a/js/id/ui/inspector.js +++ b/js/id/ui/inspector.js @@ -75,6 +75,7 @@ iD.ui.Inspector = function(context) { inspector.state = function(_) { if (!arguments.length) return state; state = _; + entityEditor.state(state); return inspector; }; diff --git a/js/id/ui/sidebar.js b/js/id/ui/sidebar.js index 0fee5d907..b3c7294d1 100644 --- a/js/id/ui/sidebar.js +++ b/js/id/ui/sidebar.js @@ -28,6 +28,7 @@ iD.ui.Sidebar = function(context) { } else if (!current) { featureListWrap.classed('inspector-hidden', false); inspectorWrap.classed('inspector-hidden', true); + inspector.state('hide'); } }; @@ -48,6 +49,7 @@ iD.ui.Sidebar = function(context) { } else if (!current) { featureListWrap.classed('inspector-hidden', false); inspectorWrap.classed('inspector-hidden', true); + inspector.state('hide'); } };