mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-03 13:38:04 +02:00
Hide menu on history changes
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user