From 7ead26928de055bc031442fd90789f3a9afeb560 Mon Sep 17 00:00:00 2001 From: Aaron Lidman Date: Mon, 21 Oct 2013 14:45:43 -0400 Subject: [PATCH] Fixed references to deleted items --- js/id/ui/commit.js | 6 +++--- js/id/util/relevant_changes.js | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/js/id/ui/commit.js b/js/id/ui/commit.js index 25cc60cf3..327a27331 100644 --- a/js/id/ui/commit.js +++ b/js/id/ui/commit.js @@ -163,7 +163,7 @@ iD.ui.Commit = function(context) { li.append('span') .attr('class', function(d) { - return context.geometry(d.entity.id) + ' icon icon-pre-text'; + return d.geometryType + ' icon icon-pre-text'; }); // we want to change this to an icon/bg color/something else @@ -176,13 +176,13 @@ iD.ui.Commit = function(context) { li.append('strong') .attr('class', 'entity-type') .text(function(d) { - return context.presets().match(d.entity, context.graph()).name(); + return context.presets().match(d.entity, context.history().base()).name(); }); li.append('span') .attr('class', 'entity-name') .text(function(d) { - return ' ' + (iD.util.displayName(d.entity) || ''); + return ' ' + d.name; }); li.style('opacity', 0) diff --git a/js/id/util/relevant_changes.js b/js/id/util/relevant_changes.js index d498124ab..cffc9aefd 100644 --- a/js/id/util/relevant_changes.js +++ b/js/id/util/relevant_changes.js @@ -5,8 +5,10 @@ iD.util.relevantChanges = function(graph, changes, base) { function addEntity(entity, changeType) { relevant[entity.id] = { + name: iD.util.displayName(entity) || '', entity: entity, - changeType: changeType + changeType: changeType, + geometryType: base.entity(entity.id).geometry(base) }; }