Mercurial > libervia-desktop-kivy
changeset 144:ae58f84fe4e6
plugin chat: fixed dropdown:
dropdown was calling "open" each time a key was pressed, abd open is calling dismiss if dropdown is already opened.
But dismiss is calling _real_dissmiss with a schedule, resulting in incoherent state and the dropdown not closed when expected.
A check is now done to call "open" only when there is not already a dropdown, and to call dismiss when the text input is empty.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 14 Apr 2018 16:02:54 +0200 |
parents | 05d602be0120 |
children | 654b00fa3fdc |
files | cagou/plugins/plugin_wid_chat.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/cagou/plugins/plugin_wid_chat.py Fri Apr 13 19:29:35 2018 +0200 +++ b/cagou/plugins/plugin_wid_chat.py Sat Apr 14 16:02:54 2018 +0200 @@ -282,6 +282,7 @@ if not text: self._hi_comp_data = None self._hi_comp_last = None + self._hi_comp_dropdown.dismiss() return profile = list(self.profiles)[0] @@ -323,8 +324,8 @@ to_remove.append(c) for c in to_remove: dropdown.remove_widget(c) - - dropdown.open(wid) + if dropdown.attach_to is None: + dropdown.open(wid) self._hi_comp_last = text def messageDataConverter(self, idx, mess_id):