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:
parent
a3347710db
commit
67e9e305ec
|
|
@ -2693,7 +2693,8 @@ proc myload_place_symbol {} {
|
||||||
global myload_retval
|
global myload_retval
|
||||||
|
|
||||||
set entry [.load.buttons_bot.entry get]
|
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}
|
if {$myload_retval == $entry} {return}
|
||||||
set myload_retval $entry
|
set myload_retval $entry
|
||||||
set sym [myload_getresult 2 0]
|
set sym [myload_getresult 2 0]
|
||||||
|
|
@ -2978,6 +2979,9 @@ proc load_file_dialog {{msg {}} {ext {}} {global_initdir {INITIALINSTDIR}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if {$myload_loadfile == 2} {
|
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
|
myload_place_symbol
|
||||||
}
|
}
|
||||||
};# bind .load.l.paneright.list <<ListboxSelect>>
|
};# bind .load.l.paneright.list <<ListboxSelect>>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue