File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1392,15 +1392,25 @@ class TGraphPainter extends ObjectPainter {
13921392 fillContextMenuItems ( menu ) {
13931393 if ( ! this . snapid ) {
13941394 menu . addchk ( this . testEditable ( ) , 'Editable' , ( ) => { this . testEditable ( 'toggle' ) ; this . drawGraph ( ) ; } ) ;
1395-
1395+ if ( this . axes_draw ) {
1396+ menu . add ( 'Title' , ( ) => menu . input ( 'Enter graph title' , this . getObject ( ) . fTitle ) . then ( res => {
1397+ this . getObject ( ) . fTitle = res ;
1398+ const hist_painter = this . getMainPainter ( ) ;
1399+ if ( hist_painter ?. isSecondary ( this ) ) {
1400+ setHistogramTitle ( hist_painter . getHisto ( ) , res ) ;
1401+ this . interactiveRedraw ( 'pad' ) ;
1402+ }
1403+ } ) ) ;
1404+ }
13961405 menu . addRedrawMenu ( this . getPrimary ( ) ) ;
13971406 }
13981407 }
13991408
14001409 /** @summary Execute menu command
14011410 * @private */
14021411 executeMenuCommand ( method , args ) {
1403- if ( super . executeMenuCommand ( method , args ) ) return true ;
1412+ if ( super . executeMenuCommand ( method , args ) )
1413+ return true ;
14041414
14051415 const canp = this . getCanvPainter ( ) , pmain = this . get_main ( ) ;
14061416
You can’t perform that action at this time.
0 commit comments