Skip to content

Commit

Permalink
fixed restoring renamed upvars when customizing primitives
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoenig committed Jun 7, 2024
1 parent e291f1c commit b2fb4c6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions DEVLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
* new microblocks & ble libraries, thanks, Bernat!
* updated sw cache for ble and microblocks libraries
* incremented dev version
* byob: fixed restoring renamed upvars when customizing primitives

### 2024-06-06
* embroidery library: fixed occasional arc issue
Expand Down
2 changes: 1 addition & 1 deletion snap.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<script src="src/gui.js?version=2024-06-07"></script>
<script src="src/paint.js?version=2023-05-24"></script>
<script src="src/lists.js?version=2024-04-08"></script>
<script src="src/byob.js?version=2024-06-01"></script>
<script src="src/byob.js?version=2024-06-07"></script>
<script src="src/tables.js?version=2023-08-17"></script>
<script src="src/sketch.js?version=2023-05-24"></script>
<script src="src/video.js?version=2019-06-27"></script>
Expand Down
4 changes: 2 additions & 2 deletions src/byob.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ ArgLabelMorph, embedMetadataPNG, ArgMorph, RingMorph*/

// Global stuff ////////////////////////////////////////////////////////

modules.byob = '2024-June-01';
modules.byob = '2024-June-07';

// Declarations

Expand Down Expand Up @@ -1311,7 +1311,7 @@ CustomCommandBlockMorph.prototype.refresh = function (aDefinition, offset) {
CustomCommandBlockMorph.prototype.restoreInputs = function (oldInputs, offset) {
// try to restore my previous inputs when my spec has been changed

if (offset || this.definition?.primitive) {
if (offset) { // || this.definition?.primitive) {
// assuming a "relabel" action that needs to shift inputs
this.refreshDefaults();
BlockMorph.prototype.restoreInputs.call(this, oldInputs, offset);
Expand Down
2 changes: 1 addition & 1 deletion src/gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -5074,7 +5074,7 @@ IDE_Morph.prototype.projectMenu = function () {
'\nand remove their definitions'
);
}
if (shiftClicked) {
if (shiftClicked && SpriteMorph.prototype.hasCustomizedPrimitives()) {
menu.addItem(
'Export customized primitives...',
() => this.exportCustomizedPrimitives(),
Expand Down

0 comments on commit b2fb4c6

Please sign in to comment.