mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-24 00:26:08 +00:00
Fix warning: Access to member 'toolbar' before its definition line 616
Not really an issue though.
This commit is contained in:
@@ -78,6 +78,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
QtWidgets.QMainWindow.__init__(self, parent)
|
||||
self.selected_objects = []
|
||||
self.ignore_selection_changes = False
|
||||
self.toolbar = None
|
||||
self.setupUi()
|
||||
|
||||
def setupUi(self):
|
||||
@@ -615,7 +616,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
self.create_action_toolbar()
|
||||
|
||||
def create_action_toolbar(self):
|
||||
if getattr(self, 'toolbar', None):
|
||||
if self.toolbar:
|
||||
self.toolbar.clear()
|
||||
self.removeToolBar(self.toolbar)
|
||||
self.toolbar = toolbar = QtWidgets.QToolBar(_("Actions"))
|
||||
|
||||
Reference in New Issue
Block a user