fix tab context menu close (invalid switching after deletion)
This commit is contained in:
parent
8e844ff913
commit
f9d3661c15
|
|
@ -5604,11 +5604,15 @@ proc tab_ctx_cmd {tab_but what} {
|
|||
xschem new_schematic switch $old {} 0 ;# no draw
|
||||
} elseif {$what eq {close}} {
|
||||
set old [xschem get current_win_path]
|
||||
set ntabs [xschem get ntabs]
|
||||
xschem new_schematic switch $win_path {} 0 ;# no draw
|
||||
xschem exit
|
||||
set remaining_tabs [xschem exit]
|
||||
if { $old != $win_path || $remaining_tabs == $ntabs} {
|
||||
# don't switch if we were on the tab that has been closed.
|
||||
xschem new_schematic switch $old {} 1 ;# draw
|
||||
}
|
||||
}
|
||||
}
|
||||
# puts $filename
|
||||
}
|
||||
proc tab_context_menu {tab_but} {
|
||||
|
|
|
|||
Loading…
Reference in New Issue