From 0fd6c4d8c9c65dd218b2880f51fee4d31f04a083 Mon Sep 17 00:00:00 2001
From: DD Liu <liudi@media.mit.edu>
Date: Thu, 15 Jun 2017 11:52:02 -0400
Subject: [PATCH] refresh workspace when setting to visible

---
 src/containers/blocks.jsx | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/containers/blocks.jsx b/src/containers/blocks.jsx
index 996741267..3bce0f3c5 100644
--- a/src/containers/blocks.jsx
+++ b/src/containers/blocks.jsx
@@ -63,8 +63,10 @@ class Blocks extends React.Component {
         }
 
         // @todo hack to resize blockly manually in case resize happened while hidden
+        // @todo hack to reload the workspace due to gui bug #413
         if (this.props.isVisible) { // Scripts tab
             this.workspace.setVisible(true);
+            this.props.vm.refreshWorkspace();
             window.dispatchEvent(new Event('resize'));
             this.workspace.toolbox_.refreshSelection();
         } else {
-- 
GitLab