mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Force sync redraw of view when replacing unknown nodes
This commit is contained in:
parent
fa8236ee2c
commit
7fa4df082e
@ -1596,8 +1596,9 @@ RED.nodes = (function() {
|
|||||||
});
|
});
|
||||||
removeLinks.forEach(removeLink);
|
removeLinks.forEach(removeLink);
|
||||||
|
|
||||||
|
// Force the redraw to be synchronous so the view updates
|
||||||
RED.view.redraw(true);
|
// *now* and removes the unknown node
|
||||||
|
RED.view.redraw(true, true);
|
||||||
var result = importNodes(reimportList,false);
|
var result = importNodes(reimportList,false);
|
||||||
var newNodeMap = {};
|
var newNodeMap = {};
|
||||||
result[0].forEach(function(n) {
|
result[0].forEach(function(n) {
|
||||||
@ -1611,7 +1612,7 @@ RED.nodes = (function() {
|
|||||||
l.target = newNodeMap[l.target.id];
|
l.target = newNodeMap[l.target.id];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
RED.view.redraw(true, true);
|
RED.view.redraw(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -4561,18 +4561,16 @@ if (DEBUG_EVENTS) { console.warn("nodeMouseDown", mouse_mode,d); }
|
|||||||
},
|
},
|
||||||
|
|
||||||
updateActive: updateActiveNodes,
|
updateActive: updateActiveNodes,
|
||||||
redraw: function(updateActive, force) {
|
redraw: function(updateActive, syncRedraw) {
|
||||||
if (force) {
|
|
||||||
activeNodes = [];
|
|
||||||
activeLinks = [];
|
|
||||||
activeGroups = [];
|
|
||||||
_redraw();
|
|
||||||
}
|
|
||||||
if (updateActive) {
|
if (updateActive) {
|
||||||
updateActiveNodes();
|
updateActiveNodes();
|
||||||
updateSelection();
|
updateSelection();
|
||||||
}
|
}
|
||||||
redraw();
|
if (syncRedraw) {
|
||||||
|
_redraw();
|
||||||
|
} else {
|
||||||
|
redraw();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
focus: focusView,
|
focus: focusView,
|
||||||
importNodes: importNodes,
|
importNodes: importNodes,
|
||||||
|
Loading…
Reference in New Issue
Block a user