File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -614,7 +614,13 @@ export function addCommands(
614614 ? tracker . currentWidget . model . sharedModel . editable
615615 : false ;
616616 } ,
617- execute : async ( ) => await Private . toggleConsole ( tracker )
617+ isToggled : ( ) => {
618+ return tracker . currentWidget ?. content . consoleOpened === true ;
619+ } ,
620+ execute : async ( ) => {
621+ await Private . toggleConsole ( tracker ) ;
622+ commands . notifyCommandChanged ( CommandIDs . toggleConsole ) ;
623+ }
618624 } ) ;
619625 commands . addCommand ( CommandIDs . executeConsole , {
620626 label : trans . __ ( 'Execute console' ) ,
Original file line number Diff line number Diff line change @@ -230,6 +230,10 @@ export class JupyterCadPanel extends SplitPanel {
230230 this . _view . set ( 'transform' , value ) ;
231231 }
232232
233+ get consoleOpened ( ) : boolean {
234+ return this . _consoleOpened ;
235+ }
236+
233237 executeConsole ( ) {
234238 if ( this . _consoleView ) {
235239 this . _consoleView . execute ( ) ;
You can’t perform that action at this time.
0 commit comments