File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change 47584758 }
47594759
47604760 JSROOT . TPadPainter . prototype . CheckColors = function ( can ) {
4761- if ( ! can || ! can . fPrimitives ) return ;
4762-
4763- for ( var i = 0 ; i < can . fPrimitives . arr . length ; ++ i ) {
4764- var obj = can . fPrimitives . arr [ i ] ;
4765- if ( obj == null ) continue ;
4766- if ( ( obj . _typename == "TObjArray" ) && ( obj . name == "ListOfColors" ) ) {
4767- JSROOT . Painter . adoptRootColors ( obj ) ;
4768- can . fPrimitives . arr . splice ( i , 1 ) ;
4769- can . fPrimitives . opt . splice ( i , 1 ) ;
4770- return ;
4771- }
4761+ var lst = can ? can . fPrimitives : null ;
4762+ if ( ! lst ) return ;
4763+ for ( var i = 0 ; i < lst . arr . length ; ++ i ) {
4764+ var obj = lst . arr [ i ] ;
4765+ if ( ! obj || ( obj . _typename !== "TObjArray" ) ) continue ;
4766+ if ( obj . name == "ListOfColors" ) JSROOT . Painter . adoptRootColors ( obj ) ;
4767+ else if ( obj . name != "CurrentColorPalette" ) continue ;
4768+ lst . arr . splice ( i , 1 ) ;
4769+ lst . opt . splice ( i , 1 ) ;
4770+ i -- ;
47724771 }
47734772 }
47744773
You can’t perform that action at this time.
0 commit comments