fixed changing the type of a custom block from reporter to command in the block editor

pull/95/head
jmoenig 2020-09-04 14:13:33 +02:00
rodzic 44bf353c97
commit 55d02099d4
2 zmienionych plików z 8 dodań i 3 usunięć

Wyświetl plik

@ -6,6 +6,8 @@
* "export block definition" including dependencies * "export block definition" including dependencies
* hyperized "distance/direction to _" reporter primitive * hyperized "distance/direction to _" reporter primitive
* new "Database" library operating on localstore * new "Database" library operating on localstore
* **Notable Fixes:**
* changing the type of a custom block from reporter to command in the block editor changes the prototype instead of adding another one
* **Translation Updates:** * **Translation Updates:**
* Catalan, thanks, Joan! * Catalan, thanks, Joan!
* Norwegian, thanks, Olav! * Norwegian, thanks, Olav!
@ -14,6 +16,7 @@
### 2020-09-04 ### 2020-09-04
* byob, blocks, objects: refactored scanning for message senders * byob, blocks, objects: refactored scanning for message senders
* blocks: support scanning for message receivers from inside a block editor * blocks: support scanning for message receivers from inside a block editor
* blocks: fixed changing the type of a custom block from reporter to command in the block editor
### 2020-09-03 ### 2020-09-03
* byob: experimental: Inspect & export dependencies for global custom blocks (shift-right-click for context menu) * byob: experimental: Inspect & export dependencies for global custom blocks (shift-right-click for context menu)
@ -46,7 +49,7 @@
* show message senders / receivers from the blocks context menu, thanks, Bernat! * show message senders / receivers from the blocks context menu, thanks, Bernat!
## 6.1.4: ## 6.1.4:
* fixed "green flag" symbol size for embedded proects (for real ^^)= * fixed "green flag" symbol size for embedded proects (for real ^^)
## 6.1.3: ## 6.1.3:
* **Notable Changes:** * **Notable Changes:**

Wyświetl plik

@ -456,7 +456,9 @@ SyntaxElementMorph.prototype.replaceInput = function (oldArg, newArg) {
} }
replacement.parent = this; replacement.parent = this;
this.children[idx] = replacement; this.children[idx] = replacement;
if (oldArg instanceof ReporterBlockMorph && scripts) { if (oldArg instanceof ReporterBlockMorph && scripts &&
!oldArg.isPrototype
) {
if (!(oldArg instanceof RingMorph) if (!(oldArg instanceof RingMorph)
|| (oldArg instanceof RingMorph && oldArg.contents())) { || (oldArg instanceof RingMorph && oldArg.contents())) {
scripts.add(oldArg); scripts.add(oldArg);