]> git.phdru.name Git - m_librarian.git/commitdiff
Refactor(wx): Do not store attributes we do not need later
authorOleg Broytman <phd@phdru.name>
Fri, 5 Jan 2024 21:15:24 +0000 (00:15 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 5 Jan 2024 21:16:44 +0000 (00:16 +0300)
[skip ci]

m_librarian/wx/Application.py
m_librarian/wx/SearchPanel.py

index b7ad92dacb05bceebfc63e7b8d1ae02067625e33..41d42d1649284940e35328280b5b8b30f09658a8 100644 (file)
@@ -10,7 +10,7 @@ class MainWindow(AWindow):
 
     def OnInit(self):
         AWindow.OnInit(self)
-        self.search_panel = SearchPanel(self)
+        SearchPanel(self)
 
 
 class Application(wx.App):
index 11633b3b7a29662229cc6a57ba2f8ea1c4b77aa0..89b0698c5761377390ac405c0776aa657f0a51ef 100644 (file)
@@ -10,7 +10,7 @@ class SearchPanel(wx.Panel):
 
     def __init__(self, parent):
         wx.Panel.__init__(self, parent)
-        self.search_authors_vsizer = search_authors_vsizer = \
+        search_authors_vsizer = \
             wx.StaticBoxSizer(wx.VERTICAL, self, u'Поиск авторов')
         self.SetSizer(search_authors_vsizer)
 
@@ -34,8 +34,7 @@ class SearchPanel(wx.Panel):
             self, label=u'Различать прописные/строчные')
         search_authors_vsizer.Add(search_case)
 
-        self.search_authors_button = search_authors_button = wx.Button(
-            self, label=u'Искать авторов')
+        search_authors_button = wx.Button(self, label=u'Искать авторов')
         search_authors_vsizer.Add(search_authors_button, 0, wx.ALIGN_CENTER, 0)
         search_authors_button.Bind(wx.EVT_BUTTON, self.SearchAuthors)