Mercurial > libervia-backend
comparison frontends/src/primitivus/profile_manager.py @ 1479:057f0714f27e
primivitus: fixed profile manager exception when nothing is focused
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 20 Aug 2015 18:41:06 +0200 |
parents | 069ad98b360d |
children | 66d01f29f886 |
comparison
equal
deleted
inserted
replaced
1478:90130847a0a8 | 1479:057f0714f27e |
---|---|
161 | 161 |
162 @param list_wid: the List widget who sent the event | 162 @param list_wid: the List widget who sent the event |
163 """ | 163 """ |
164 self.updateConnectionParams() | 164 self.updateConnectionParams() |
165 focused = list_wid.focus | 165 focused = list_wid.focus |
166 selected = focused.getState() | 166 selected = focused.getState() if focused is not None else False |
167 if not selected: # profile was just unselected | 167 if not selected: # profile was just unselected |
168 return | 168 return |
169 focused.setState(False, invisible=True) # we don't want the widget to be selected until we are sure we can access it | 169 focused.setState(False, invisible=True) # we don't want the widget to be selected until we are sure we can access it |
170 def authenticate_cb(callback_id, data, profile): | 170 def authenticate_cb(callback_id, data, profile): |
171 if C.bool(data['validated']): | 171 if C.bool(data['validated']): |