File tree Expand file tree Collapse file tree 4 files changed +10
-1
lines changed
client/datascience/interactive-common
datascience-ui/native-editor Expand file tree Collapse file tree 4 files changed +10
-1
lines changed Original file line number Diff line number Diff line change
1
+ Switching kernels should disable the run/interrupt/restart buttons.
Original file line number Diff line number Diff line change @@ -1480,7 +1480,12 @@ export abstract class InteractiveBase extends WebViewHost<IInteractiveWindowMapp
1480
1480
if ( ! this . _notebook ) {
1481
1481
return ;
1482
1482
}
1483
- await this . commandManager . executeCommand ( Commands . SwitchJupyterKernel , this . _notebook ) ;
1483
+ try {
1484
+ this . startProgress ( ) ;
1485
+ await this . commandManager . executeCommand ( Commands . SwitchJupyterKernel , this . _notebook ) ;
1486
+ } finally {
1487
+ this . stopProgress ( ) ;
1488
+ }
1484
1489
}
1485
1490
private async kernelChangeHandler ( kernel : IJupyterKernelSpec | LiveKernelModel ) {
1486
1491
// Check if we are changing to LiveKernelModel
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ interface INativeCellBaseProps {
43
43
editorOptions : monacoEditor . editor . IEditorOptions ;
44
44
themeMatplotlibPlots : boolean | undefined ;
45
45
focusPending : number ;
46
+ busy : boolean ;
46
47
}
47
48
48
49
type INativeCellProps = INativeCellBaseProps & typeof actionCreators ;
@@ -567,6 +568,7 @@ export class NativeCell extends React.Component<INativeCellProps> {
567
568
onClick = { runCell }
568
569
tooltip = { getLocString ( 'DataScience.runCell' , 'Run cell' ) }
569
570
hidden = { this . isMarkdownCell ( ) }
571
+ disabled = { this . props . busy }
570
572
>
571
573
< Image baseTheme = { this . props . baseTheme } class = "image-button-image" image = { ImageName . Run } />
572
574
</ ImageButton >
Original file line number Diff line number Diff line change @@ -477,6 +477,7 @@ ${buildSettingsCss(this.props.settings)}`}</style>
477
477
themeMatplotlibPlots = { this . props . settings . themeMatplotlibPlots }
478
478
// Focus pending does not apply to native editor.
479
479
focusPending = { 0 }
480
+ busy = { this . props . busy }
480
481
/>
481
482
</ ErrorBoundary >
482
483
{ lastLine }
You can’t perform that action at this time.
0 commit comments