GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: only refresh the toolbox when procedures are created via undo (#19) · SnoopyMod/snoopymod.github.io@f6dfd53

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/containers
    • blocks.jsx
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/containers/blocks.jsx‎

Copy file name to clipboardExpand all lines: src/containers/blocks.jsx
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,12 @@ class Blocks extends React.Component {
148148
event.type === this.ScratchBlocks.Events.VAR_DELETE ||
149149
(event.type === this.ScratchBlocks.Events.BLOCK_DELETE &&
150150
event.oldJson.type === "procedures_definition") ||
151+
// Only refresh the toolbox when procedure block creations are
152+
// triggered by undoing a deletion (implied by recordUndo being
153+
// false on the event).
151154
(event.type === this.ScratchBlocks.Events.BLOCK_CREATE &&
152-
event.json.type === "procedures_definition")
155+
event.json.type === "procedures_definition" &&
156+
!event.recordUndo)
153157
) {
154158
this.requestToolboxUpdate();
155159
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.