fixed copying unattached comments among sprites, thanks, @jadga-h for the report!

snap7
jmoenig 2021-09-06 10:39:54 +02:00
rodzic 20add8767f
commit fab3d89942
3 zmienionych plików z 8 dodań i 3 usunięć

Wyświetl plik

@ -25,6 +25,7 @@
* fixed audio_comp library "plot sound" block to work with translations, thanks, Hans, for the report!
* colors library: fixed SET PEN to work with more than a single sprite per costume, thanks, Jadga, for the report!
* fixed exporting comment pics from inside the block editor, thanks, Jadga, for the report!
* fixed copying unattached comments among sprites, thanks, Jadga, for the report!
* **Documentation Updates:**
* updated manual, thanks Brian!
* updated readme, thanks, Michael!
@ -34,6 +35,7 @@
### 2021-09-06
* blocks: fixed exporting comment pics from inside the block editor, thanks, Jadga, for the report!
* gui: fixed copying unattached comments among sprites, thanks, Jadga, for the report!
### 2021-08-27
* colors library: fixed SET PEN to work with more than a single sprite per costume, thanks, Jadga, for the report!

Wyświetl plik

@ -20,7 +20,7 @@
<script src="src/threads.js?version=2021-07-20"></script>
<script src="src/objects.js?version=2021-07-23"></script>
<script src="src/scenes.js?version=2021-07-21"></script>
<script src="src/gui.js?version=2021-08-06"></script>
<script src="src/gui.js?version=2021-09-06"></script>
<script src="src/paint.js?version=2021-07-05"></script>
<script src="src/lists.js?version=2021-07-19"></script>
<script src="src/byob.js?version=2021-08-03"></script>

Wyświetl plik

@ -9419,12 +9419,13 @@ SpriteIconMorph.prototype.wantsDropOf = function (morph) {
// allow scripts & media to be copied from one sprite to another
// by drag & drop
return morph instanceof BlockMorph
|| (morph instanceof CommentMorph)
|| (morph instanceof CostumeIconMorph)
|| (morph instanceof SoundIconMorph);
};
SpriteIconMorph.prototype.reactToDropOf = function (morph, hand) {
if (morph instanceof BlockMorph) {
if (morph instanceof BlockMorph || morph instanceof CommentMorph) {
this.copyStack(morph);
} else if (morph instanceof CostumeIconMorph) {
this.copyCostume(morph.object);
@ -9446,7 +9447,9 @@ SpriteIconMorph.prototype.copyStack = function (block) {
dup.setPosition(new Point(sprite.scripts.left() + 20, y + 20));
sprite.scripts.add(dup);
dup.allComments().forEach(comment => comment.align(dup));
if (dup instanceof BlockMorph) {
dup.allComments().forEach(comment => comment.align(dup));
}
sprite.scripts.adjustBounds();
// delete all local custom blocks (methods) that the receiver