fix persistent insert symbol dialog by not placing anything if selecting multiple times the same symbol. proc myload_place_symbol: add an update statement to resolve race conditions.

This commit is contained in:
stefan schippers 2023-04-29 01:59:35 +02:00
parent a3347710db
commit 67e9e305ec
1 changed files with 5 additions and 1 deletions

View File

@ -2693,7 +2693,8 @@ proc myload_place_symbol {} {
global myload_retval
set entry [.load.buttons_bot.entry get]
puts "entry=$entry, myload_retval=$myload_retval"
# puts "entry=$entry, myload_retval=$myload_retval"
update
if {$myload_retval == $entry} {return}
set myload_retval $entry
set sym [myload_getresult 2 0]
@ -2978,6 +2979,9 @@ proc load_file_dialog {{msg {}} {ext {}} {global_initdir {INITIALINSTDIR}}
}
}
if {$myload_loadfile == 2} {
# set to empty to avoid myload_place_symbol doing nothing if placing
# the same symbol multiple times.
set myload_retval {}
myload_place_symbol
}
};# bind .load.l.paneright.list <<ListboxSelect>>