Ensure that if a procedure call exists, so does its definition.

Specifically, if a call is copied, then the def is deleted, then the
call is pasted, the def should be created.
This commit is contained in:
Neil Fraser
2016-07-08 15:50:09 -07:00
parent 2b191e897e
commit 2dab19c015
5 changed files with 77 additions and 43 deletions

View File

@@ -277,7 +277,9 @@ Blockly.onKeyDown_ = function(e) {
if (e.keyCode == 86) {
// 'v' for paste.
if (Blockly.clipboardXml_) {
Blockly.Events.setGroup(true);
Blockly.clipboardSource_.paste(Blockly.clipboardXml_);
Blockly.Events.setGroup(false);
}
} else if (e.keyCode == 90) {
// 'z' for undo 'Z' is for redo.