Redraw entity editor fields on addition, deletion too

This is important to make the turn restriction editor work
This commit is contained in:
Bryan Housel
2019-04-23 01:07:38 -04:00
parent 7dce4bb161
commit a3bc164c43
2 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -241,7 +241,11 @@ export function uiEntityEditor(context) {
function historyChanged(difference) {
if (_state === 'hide') return;
if (!difference || !difference.didChange.properties) return;
var significant = !difference ||
difference.didChange.properties ||
difference.didChange.addition ||
difference.didChange.deletion;
if (!significant) return;
var entity = context.hasEntity(_entityID);
var graph = context.graph();
+2 -2
View File
@@ -612,11 +612,11 @@ export function uiFieldRestrictions(field, context) {
}
restrictions.entity = function(_) {
restrictions.entity = function(val) {
_intersection = null;
_fromWayID = null;
_oldTurns = null;
_vertexID = _.id;
_vertexID = val.id;
};