Browse Source

Merge pull request #2772 from afshin/settings-ui

Fix jarring visual effect when settings load.
S. Chris Colbert 7 years ago
parent
commit
e02b9322b0
1 changed files with 6 additions and 1 deletions
  1. 6 1
      packages/settingeditor-extension/src/settingeditor.ts

+ 6 - 1
packages/settingeditor-extension/src/settingeditor.ts

@@ -234,8 +234,13 @@ class SettingEditor extends Widget {
     // Allow the message queue (which includes fit requests that might disrupt
     // setting relative sizes) to clear before setting sizes.
     requestAnimationFrame(() => {
-      this._fetchState().then(() => { this._setPresets(); }).catch(reason => {
+      this._panel.hide();
+      this._fetchState().then(() => {
+        this._panel.show();
+        this._setPresets();
+      }).catch(reason => {
         console.error('Fetching setting editor state failed', reason);
+        this._panel.show();
         this._setPresets();
       });
     });