mirror of
https://github.com/norohind/EDMC_SpanshRouter.git
synced 2025-04-21 19:47:36 +03:00
Prevent suggestions from showing after route is plotted
This commit is contained in:
parent
d4bd41155d
commit
face54fc95
@ -39,10 +39,10 @@ class AutoCompleter(PlaceHolder):
|
||||
|
||||
self.update_me()
|
||||
|
||||
def ac_foc_out(self, event):
|
||||
def ac_foc_out(self, event=None):
|
||||
x,y = self.parent.winfo_pointerxy()
|
||||
widget_under_cursor = self.parent.winfo_containing(x,y)
|
||||
if widget_under_cursor != self.lb and widget_under_cursor != self:
|
||||
if (widget_under_cursor != self.lb and widget_under_cursor != self) or event is None:
|
||||
self.foc_out()
|
||||
self.hide_list()
|
||||
|
||||
|
@ -362,6 +362,10 @@ class SpanshRouter():
|
||||
dest = self.dest_ac.get().strip()
|
||||
efficiency = self.efficiency_slider.get()
|
||||
|
||||
# Hide autocomplete lists in case they're still shown
|
||||
self.source_ac.ac_foc_out()
|
||||
self.dest_ac.ac_foc_out()
|
||||
|
||||
if ( source and source != self.source_ac.placeholder and
|
||||
dest and dest != self.dest_ac.placeholder ):
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user