@@ -3203,7 +3203,6 @@ class HierarchyPainter extends BasePainter {
32033203 let prereq = GetOption ( 'prereq' ) || '' ,
32043204 filesdir = d . get ( 'path' ) || '' , // path used in normal gui
32053205 filesarr = GetOptionAsArray ( '#file;files' ) ,
3206- localfile = GetOption ( 'localfile' ) ,
32073206 jsonarr = GetOptionAsArray ( '#json;jsons' ) ,
32083207 expanditems = GetOptionAsArray ( 'expand' ) ,
32093208 focusitem = GetOption ( 'focus' ) ,
@@ -3308,9 +3307,7 @@ class HierarchyPainter extends BasePainter {
33083307 promise = this . openJsonFile ( jsonarr . shift ( ) ) ;
33093308 else if ( filesarr . length > 0 )
33103309 promise = this . openRootFile ( filesarr . shift ( ) ) ;
3311- else if ( ( localfile !== null ) && isFunc ( this . selectLocalFile ) ) {
3312- localfile = null ; promise = this . selectLocalFile ( ) ;
3313- } else if ( expanditems . length > 0 )
3310+ else if ( expanditems . length > 0 )
33143311 promise = this . expandItem ( expanditems . shift ( ) ) ;
33153312 else if ( style . length > 0 )
33163313 promise = this . applyStyle ( style . shift ( ) ) ;
@@ -3504,8 +3501,6 @@ class HierarchyPainter extends BasePainter {
35043501 } ) ;
35053502 } ) ;
35063503
3507- let localfile_read_callback = null ;
3508-
35093504 if ( ! this . is_online && ! this . no_select ) {
35103505
35113506 this . readSelectedFile = function ( ) {
@@ -3531,28 +3526,14 @@ class HierarchyPainter extends BasePainter {
35313526 } ) ;
35323527
35333528 main . select ( '.gui_localFile' ) . on ( 'change' , evnt => {
3534- let files = evnt . target . files , promises = [ ] ;
3529+ let files = evnt . target . files ;
35353530
35363531 for ( let n = 0 ; n < files . length ; ++ n ) {
35373532 let f = files [ n ] ;
35383533 main . select ( '.gui_urlToLoad' ) . property ( 'value' , f . name ) ;
3539- promises . push ( this . openRootFile ( f ) ) ;
3534+ this . openRootFile ( f ) ;
35403535 }
3541-
3542- Promise . all ( promises ) . then ( ( ) => {
3543- if ( localfile_read_callback ) {
3544- localfile_read_callback ( ) ;
3545- localfile_read_callback = null ;
3546- }
3547- } ) ;
35483536 } ) ;
3549-
3550- this . selectLocalFile = async function ( ) {
3551- return new Promise ( resolveFunc => {
3552- localfile_read_callback = resolveFunc ;
3553- main . select ( '.gui_localFile' ) . node ( ) . click ( ) ;
3554- } ) ;
3555- } ;
35563537 }
35573538
35583539 let layout = main . select ( '.gui_layout' ) ;
0 commit comments