Fixed an issue that was making Socializer unable to select or unselect audio by pressing space

This commit is contained in:
Manuel Cortez 2021-04-26 10:10:37 -05:00
parent c6fd4c00eb
commit 3013f34c19
2 changed files with 9 additions and 1 deletions

View File

@ -12,6 +12,7 @@
### bugfixes ### bugfixes
* Now it is possible to select or unselect audios in a list by pressing space again. This was not possible earlier due to an unexpected issue when migrating to the latest version of socializer's components.
* Fixed an issue when focusing chat messages. Sometimes, socializer was not precise enough to focus the right message. Now all messages should be getting the focus as expected. * Fixed an issue when focusing chat messages. Sometimes, socializer was not precise enough to focus the right message. Now all messages should be getting the focus as expected.
* Fixed a small issue that was making impossible to close the blacklist dialog by pressing escape. * Fixed a small issue that was making impossible to close the blacklist dialog by pressing escape.
* Now it is possible to perform authentication in accounts using two factor verification again. This issue was caused due to a recent change in the VK workflow for two factor verification processes. * Now it is possible to perform authentication in accounts using two factor verification again. This issue was caused due to a recent change in the VK workflow for two factor verification processes.

View File

@ -158,7 +158,14 @@ class multiselectionBaseList(wx.ListCtrl, listmix.CheckListCtrlMixin):
def on_keydown(self, event): def on_keydown(self, event):
if event.GetKeyCode() == wx.WXK_SPACE: if event.GetKeyCode() == wx.WXK_SPACE:
self.ToggleItem(self.GetFocusedItem()) # In the example of wx multiselection list they call ToggleItem.
# however this didn't worked quite well. So let's implement it manually.
if self.IsChecked(self.GetFocusedItem()):
self.SetItemImage(self.GetFocusedItem(), 0)
self.OnCheckItem(self.GetFocusedItem(), False)
else:
self.SetItemImage(self.GetFocusedItem(), 1)
self.OnCheckItem(self.GetFocusedItem(), True)
event.Skip() event.Skip()
class list(object): class list(object):