Browse Source

Merge pull request #7659 from jtpio/current-widget-null

Update the notebook tools on tracker.currentChanged
Steven Silvester 5 years ago
parent
commit
0c2ef44ebe
1 changed files with 4 additions and 4 deletions
  1. 4 4
      packages/notebook-extension/src/index.ts

+ 4 - 4
packages/notebook-extension/src/index.ts

@@ -507,11 +507,11 @@ function activateNotebookTools(
       labShell.currentChanged.connect((sender, args) => {
         updateTools();
       });
-    } else {
-      tracker.currentChanged.connect((sender, args) => {
-        updateTools();
-      });
     }
+    // A notebook widget could be closed without a change to labShell.currentWidget
+    tracker.currentChanged.connect((sender, args) => {
+      updateTools();
+    });
   });
 
   return notebookTools;