From 3f7b7c6a5a139fe40dda54aeb79a82353b8ef92e Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 24 Jan 2013 18:45:06 -0500 Subject: [PATCH] Hide menu on history changes --- js/id/modes/select.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/id/modes/select.js b/js/id/modes/select.js index 57d97817a..84f58a4d8 100644 --- a/js/id/modes/select.js +++ b/js/id/modes/select.js @@ -79,8 +79,8 @@ iD.modes.Select = function(entity, initial) { .on('changeTags', changeTags) .on('close', function() { mode.controller.exit(); }); - // Exit mode if selected entity gets undone - history.on('change.entity-undone', function() { + history.on('change.select', function() { + // Exit mode if selected entity gets undone var old = entity; entity = history.graph().entity(entity.id); if (!entity) { @@ -88,6 +88,8 @@ iD.modes.Select = function(entity, initial) { } else if(!_.isEqual(entity.tags, old.tags)) { inspector.tags(entity.tags); } + + surface.call(radialMenu.close); }); function click() { @@ -174,7 +176,7 @@ iD.modes.Select = function(entity, initial) { surface.on('click.select', null) .on('dblclick.select', null); - history.on('change.entity-undone', null); + history.on('change.select', null); surface.selectAll(".selected") .classed('selected', false);