mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Ensure a second paste of cut nodes is treated as a copy-paste
This commit is contained in:
parent
829ccc3466
commit
78ed53f4fb
@ -630,7 +630,9 @@ RED.view = (function() {
|
||||
|
||||
RED.actions.add("core:copy-selection-to-internal-clipboard",copySelection);
|
||||
RED.actions.add("core:cut-selection-to-internal-clipboard",function(){copySelection(true);deleteSelection();});
|
||||
RED.actions.add("core:paste-from-internal-clipboard",function(){importNodes(clipboard,{generateIds: clipboardSource === 'copy', generateDefaultNames: clipboardSource === 'copy'});});
|
||||
RED.actions.add("core:paste-from-internal-clipboard",function(){
|
||||
importNodes(clipboard,{generateIds: clipboardSource === 'copy', generateDefaultNames: clipboardSource === 'copy'});
|
||||
});
|
||||
|
||||
RED.actions.add("core:detach-selected-nodes", function() { detachSelectedNodes() })
|
||||
|
||||
@ -2150,6 +2152,9 @@ RED.view = (function() {
|
||||
}
|
||||
}
|
||||
if (mouse_mode == RED.state.IMPORT_DRAGGING) {
|
||||
if (clipboardSource === 'cut') {
|
||||
clipboardSource = 'copy'
|
||||
}
|
||||
updateActiveNodes();
|
||||
RED.nodes.dirty(true);
|
||||
}
|
||||
@ -3479,6 +3484,9 @@ RED.view = (function() {
|
||||
updateSelection();
|
||||
RED.nodes.dirty(true);
|
||||
redraw();
|
||||
if (clipboardSource === 'cut') {
|
||||
clipboardSource = 'copy'
|
||||
}
|
||||
resetMouseVars();
|
||||
d3.event.stopPropagation();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user