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(
614
614
? tracker . currentWidget . model . sharedModel . editable
615
615
: false ;
616
616
} ,
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
+ }
618
624
} ) ;
619
625
commands . addCommand ( CommandIDs . executeConsole , {
620
626
label : trans . __ ( 'Execute console' ) ,
Original file line number Diff line number Diff line change @@ -230,6 +230,10 @@ export class JupyterCadPanel extends SplitPanel {
230
230
this . _view . set ( 'transform' , value ) ;
231
231
}
232
232
233
+ get consoleOpened ( ) : boolean {
234
+ return this . _consoleOpened ;
235
+ }
236
+
233
237
executeConsole ( ) {
234
238
if ( this . _consoleView ) {
235
239
this . _consoleView . execute ( ) ;
You can’t perform that action at this time.
0 commit comments