Skip to content

Commit

Permalink
use correct callback to ensure UI gets refreshed after comm connectio…
Browse files Browse the repository at this point in the history
…n established
  • Loading branch information
smacke committed Jan 18, 2024
1 parent fec05d8 commit deae523
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions frontend/labextension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1003,8 +1003,6 @@ const connectToComm = (
return;
}

notifyActiveCell(state.activeCell.model);

if (state.dirtyCells.has(state.activeCell.model.id)) {
(state.activeCell.model as any)._setDirty?.(true);
}
Expand Down Expand Up @@ -1192,7 +1190,7 @@ const connectToComm = (
refreshNodeMapping(notebook);
notebook.activeCellChanged.connect(onActiveCellChange);
notebook.activeCell.model.stateChanged.connect(onExecution);
notifyActiveCell(notebook.activeCell.model);
onActiveCellChange(notebook, notebook.activeCell);
notebook.model.contentChanged.connect(onContentChanged);
notebook.model.cells.changed.connect(onContentChanged);
state.requestComputeExecSchedule();
Expand Down

0 comments on commit deae523

Please sign in to comment.