File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -280,10 +280,8 @@ export class JobManagerView implements TreeDataProvider<any> {
280280
281281 vscode . commands . registerCommand ( selectJobCommand , async ( selectedName : string ) => {
282282 if ( selectedName ) {
283- const selectedJob = await JobManager . setSelection ( selectedName ) ;
283+ await JobManager . setSelection ( selectedName ) ;
284284 this . refresh ( ) ;
285-
286- setCancelButtonVisibility ( selectedJob . job . getStatus ( ) === JobStatus . Busy ) ;
287285 }
288286 } ) ,
289287
@@ -305,6 +303,9 @@ export class JobManagerView implements TreeDataProvider<any> {
305303 refresh ( ) {
306304 this . _onDidChangeTreeData . fire ( ) ;
307305 updateStatusBar ( ) ;
306+
307+ const selectedJob = JobManager . getSelection ( ) ;
308+ setCancelButtonVisibility ( selectedJob && selectedJob . job . getStatus ( ) === JobStatus . Busy ) ;
308309 }
309310
310311 getTreeItem ( element : vscode . TreeItem ) {
You can’t perform that action at this time.
0 commit comments