X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_librarian%2Fwx%2FListAuthors.py;h=8f18a7a6c29ec42aa1a96f103f363189e681fa07;hb=9f269c21f91b1865ffe2c8bfdab4974d26c97295;hp=3d73a2827c7d3949707afe07298b43ffe930b15e;hpb=80ba14a7bd17c4ddf1bd7c193e0bba6aa4d0c907;p=m_librarian.git diff --git a/m_librarian/wx/ListAuthors.py b/m_librarian/wx/ListAuthors.py index 3d73a28..8f18a7a 100644 --- a/m_librarian/wx/ListAuthors.py +++ b/m_librarian/wx/ListAuthors.py @@ -36,9 +36,6 @@ class ListAuthorsPanel(GridPanel): grid.AutoSizeColumns() grid.AutoSizeRows() - grid.Bind(wx.grid.EVT_GRID_CELL_LEFT_DCLICK, self.OnDClick) - grid.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown) - def listBooks(self, row): authors = self.param['authors'] author = authors[row] @@ -50,7 +47,9 @@ class ListAuthorsPanel(GridPanel): self.listBooks(row) def OnKeyDown(self, event): - if event.GetKeyCode() in (wx.WXK_RETURN, wx.WXK_NUMPAD_ENTER): + if event.GetKeyCode() == wx.WXK_ESCAPE: + self.Parent.Close() + elif event.GetKeyCode() in (wx.WXK_RETURN, wx.WXK_NUMPAD_ENTER): row = self.grid.GetGridCursorRow() self.listBooks(row) else: