proc set_paths will set initial dirs (set_initial_dirs) so no need to press Home button after reconfiguring XSCHEM_LIBRARY_PATH and running set_paths

This commit is contained in:
Stefan Frederik 2022-10-29 21:17:13 +02:00
parent ed0924e6ca
commit 04c05a5703
1 changed files with 18 additions and 18 deletions

View File

@ -5934,6 +5934,21 @@ tclcommand=\"xschem raw_read \$netlist_dir/[file tail [file rootname [xschem get
label $topwin.statusbar.8 -activebackground red -text {}
}
proc set_initial_dirs {} {
global INITIALLOADDIR INITIALINSTDIR INITIALPROPDIR pathlist
set INITIALLOADDIR {}
set INITIALINSTDIR {}
set INITIALPROPDIR {}
foreach i $pathlist {
if { [file exists $i] } {
set INITIALLOADDIR $i
set INITIALINSTDIR $i
set INITIALPROPDIR $i
break
}
}
}
proc set_paths {} {
global XSCHEM_LIBRARY_PATH env pathlist OS add_all_windows_drives
set pathlist {}
@ -5959,7 +5974,10 @@ proc set_paths {} {
lappend pathlist $i
}
}
set myload_files1 $pathlist
}
# set INITIALLOADDIR INITIALINSTDIR INITIALPROPDIR as initial locations in load file dialog box
set_initial_dirs
}
proc print_help_and_exit {} {
@ -5995,21 +6013,6 @@ proc set_missing_colors_to_black {} {
}
}
proc set_initial_dirs {} {
global INITIALLOADDIR INITIALINSTDIR INITIALPROPDIR pathlist
set INITIALLOADDIR {}
set INITIALINSTDIR {}
set INITIALPROPDIR {}
foreach i $pathlist {
if { [file exists $i] } {
set INITIALLOADDIR $i
set INITIALINSTDIR $i
set INITIALPROPDIR $i
break
}
}
}
proc create_layers_menu { {topwin {} } } {
global dark_colorscheme colors
if { $dark_colorscheme == 1 } { set txt_color black} else { set txt_color white}
@ -6328,9 +6331,6 @@ load_recent_file
# schematic to preload in new windows 20090708
set_ne XSCHEM_START_WINDOW {}
# set INITIALLOADDIR INITIALINSTDIR INITIALPROPDIR as initial locations in load file dialog box
set_initial_dirs
set custom_token {lab}
set search_value {}
set search_exact 0