Made spelling corrections to variables

This commit is contained in:
Kevin Gay 2017-07-26 21:59:59 -04:00 committed by GitHub
parent 3aa1c59fc2
commit 5506da5b55

View File

@ -115,14 +115,14 @@ class MainWindow(QMainWindow, WindowMixin):
listLayout.setContentsMargins(0, 0, 0, 0) listLayout.setContentsMargins(0, 0, 0, 0)
# Create a widget for using default label # Create a widget for using default label
self.useDefautLabelCheckbox = QCheckBox(u'Use default label') self.useDefaultLabelCheckbox = QCheckBox(u'Use default label')
self.useDefautLabelCheckbox.setChecked(False) self.useDefaultLabelCheckbox.setChecked(False)
self.defaultLabelTextLine = QLineEdit() self.defaultLabelTextLine = QLineEdit()
useDefautLabelQHBoxLayout = QHBoxLayout() useDefaultLabelQHBoxLayout = QHBoxLayout()
useDefautLabelQHBoxLayout.addWidget(self.useDefautLabelCheckbox) useDefaultLabelQHBoxLayout.addWidget(self.useDefaultLabelCheckbox)
useDefautLabelQHBoxLayout.addWidget(self.defaultLabelTextLine) useDefaultLabelQHBoxLayout.addWidget(self.defaultLabelTextLine)
useDefautLabelContainer = QWidget() useDefaultLabelContainer = QWidget()
useDefautLabelContainer.setLayout(useDefautLabelQHBoxLayout) useDefaultLabelContainer.setLayout(useDefaultLabelQHBoxLayout)
# Create a widget for edit and diffc button # Create a widget for edit and diffc button
self.diffcButton = QCheckBox(u'difficult') self.diffcButton = QCheckBox(u'difficult')
@ -134,7 +134,7 @@ class MainWindow(QMainWindow, WindowMixin):
# Add some of widgets to listLayout # Add some of widgets to listLayout
listLayout.addWidget(self.editButton) listLayout.addWidget(self.editButton)
listLayout.addWidget(self.diffcButton) listLayout.addWidget(self.diffcButton)
listLayout.addWidget(useDefautLabelContainer) listLayout.addWidget(useDefaultLabelContainer)
# Create and add a widget for showing current label items # Create and add a widget for showing current label items
self.labelList = QListWidget() self.labelList = QListWidget()
@ -771,7 +771,7 @@ class MainWindow(QMainWindow, WindowMixin):
position MUST be in global coordinates. position MUST be in global coordinates.
""" """
if not self.useDefautLabelCheckbox.isChecked() or not self.defaultLabelTextLine.text(): if not self.useDefaultLabelCheckbox.isChecked() or not self.defaultLabelTextLine.text():
if len(self.labelHist) > 0: if len(self.labelHist) > 0:
self.labelDialog = LabelDialog( self.labelDialog = LabelDialog(
parent=self, listItem=self.labelHist) parent=self, listItem=self.labelHist)
@ -1033,8 +1033,8 @@ class MainWindow(QMainWindow, WindowMixin):
for root, dirs, files in os.walk(folderPath): for root, dirs, files in os.walk(folderPath):
for file in files: for file in files:
if file.lower().endswith(tuple(extensions)): if file.lower().endswith(tuple(extensions)):
relatviePath = os.path.join(root, file) relativePath = os.path.join(root, file)
path = ustr(os.path.abspath(relatviePath)) path = ustr(os.path.abspath(relativePath))
images.append(path) images.append(path)
images.sort(key=lambda x: x.lower()) images.sort(key=lambda x: x.lower())
return images return images