@@ -57,7 +57,6 @@ type DataTableSpec = Pick<
5757  |  Action . HideTableColumn 
5858  |  Action . ShowAllColumns 
5959  |  Action . EditTableCode 
60-   |  Action . ToggleTableUI 
6160> ; 
6261
6362export  const  getTable  =  ( ) : JsRenderCodeCell  |  undefined  =>  { 
@@ -147,19 +146,14 @@ const isAlternatingColorsShowing = (): boolean => {
147146
148147const  isReadOnly  =  ( ) : boolean  =>  { 
149148  const  table  =  getTable ( ) ; 
150-   return  ! ! table ?. readonly ; 
149+   return  ! ! table ?. is_code ; 
151150} ; 
152151
153152const  isWithinTable  =  ( ) : boolean  =>  { 
154153  // getRow() returns zero if outside of the table 
155154  return  ! ! getRow ( )  ||  getColumn ( )  !==  undefined ; 
156155} ; 
157156
158- const  isTableUIShowing  =  ( ) : boolean  =>  { 
159-   const  table  =  getTable ( ) ; 
160-   return  ! ! table ?. show_ui ; 
161- } ; 
162- 
163157const  isTableNameShowing  =  ( ) : boolean  =>  { 
164158  const  table  =  getTable ( ) ; 
165159  return  ! ! table ?. show_name ; 
@@ -438,21 +432,6 @@ const editTableCode = () => {
438432  } 
439433} ; 
440434
441- export  const  toggleTableUI  =  ( )  =>  { 
442-   pixiAppSettings . setContextMenu ?.( { } ) ; 
443- 
444-   const  table  =  getTable ( ) ; 
445-   if  ( table )  { 
446-     quadraticCore . dataTableMeta ( 
447-       sheets . current , 
448-       table . x , 
449-       table . y , 
450-       {  showUI : ! table . show_ui  } , 
451-       sheets . getCursorPosition ( ) 
452-     ) ; 
453-   } 
454- } ; 
455- 
456435export  const  toggleTableColumns  =  ( )  =>  { 
457436  pixiAppSettings . setContextMenu ?.( { } ) ; 
458437
@@ -505,7 +484,7 @@ export const dataTableSpec: DataTableSpec = {
505484    Icon : FileRenameIcon , 
506485    isAvailable : ( )  =>  { 
507486      const  table  =  getTable ( ) ; 
508-       return  ! ! table ?. show_ui   &&   ! ! table ?. show_name ; 
487+       return  ! ! table ?. show_name ; 
509488    } , 
510489    run : renameTable , 
511490  } , 
@@ -642,11 +621,6 @@ export const dataTableSpec: DataTableSpec = {
642621    Icon : EditIcon , 
643622    run : editTableCode , 
644623  } , 
645-   [ Action . ToggleTableUI ] : { 
646-     label : ( )  =>  'Show table UI' , 
647-     checkbox : isTableUIShowing , 
648-     run : toggleTableUI , 
649-   } , 
650624  [ Action . ToggleTableColumns ] : { 
651625    label : ( )  =>  'Show column names' , 
652626    isAvailable : ( )  =>  ! isCodeCell ( 'Python' )  &&  ! isCodeCell ( 'Formula' ) , 
0 commit comments