mirror of
https://github.com/google/blockly.git
synced 2026-01-08 09:30:06 +01:00
Do not reconnect a previous shadow block.
Assume unplug() will recreate a new correct shadow.
This commit is contained in:
@@ -542,14 +542,16 @@ Blockly.Constants.Logic.LOGIC_COMPARE_ONCHANGE_MIXIN = {
|
||||
var prevA = this.prevBlocks_[0];
|
||||
if (prevA !== blockA) {
|
||||
blockA.unplug();
|
||||
if (prevA) {
|
||||
if (prevA && !prevA.isShadow()) {
|
||||
// The shadow block is automatically replaced during unplug().
|
||||
this.getInput('A').connection.connect(prevA.outputConnection);
|
||||
}
|
||||
}
|
||||
var prevB = this.prevBlocks_[1];
|
||||
if (prevB !== blockB) {
|
||||
blockB.unplug();
|
||||
if (prevB) {
|
||||
if (prevB && !prevB.isShadow()) {
|
||||
// The shadow block is automatically replaced during unplug().
|
||||
this.getInput('B').connection.connect(prevB.outputConnection);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user