Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
rename functions
Browse files Browse the repository at this point in the history
  • Loading branch information
tzutalin committed Sep 12, 2020
1 parent 12dadc6 commit 08db03a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions labelImg.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def __init__(self, defaultFilename=None, defaultPrefdefClassFile=None, defaultSa

opendir = action(getStr('openDir'), self.openDirDialog,
'Ctrl+u', 'open', getStr('openDir'))

copyPrevBounding = action(getStr('copyPrevBounding'), self.copyPreviousBoundingBoxes,
'Ctrl+v', 'paste', getStr('copyPrevBounding'))

Expand Down Expand Up @@ -1063,8 +1063,8 @@ def loadFile(self, filePath=None):
self.adjustScale(initial=True)
self.paintCanvas()
self.addRecentFile(self.filePath)
self.toggleActions(True)
self.showXmlBoundingBoxes(filePath)
self.toggleActions(True)
self.showBoundingBoxFromAnnotationFile(filePath)

self.setWindowTitle(__appname__ + ' ' + filePath)

Expand All @@ -1077,7 +1077,7 @@ def loadFile(self, filePath=None):
return True
return False

def showXmlBoundingBoxes(self, filePath):
def showBoundingBoxFromAnnotationFile(self, filePath):
if self.defaultSaveDir is not None:
basename = os.path.basename(
os.path.splitext(filePath)[0])
Expand Down Expand Up @@ -1500,11 +1500,11 @@ def loadYOLOTXTByFilename(self, txtPath):

def copyPreviousBoundingBoxes(self):
currIndex = self.mImgList.index(self.filePath)
prevFilePath = self.mImgList[currIndex - 1]

self.showXmlBoundingBoxes(prevFilePath)
self.saveFile()
if currIndex - 1 >= 0:
prevFilePath = self.mImgList[currIndex - 1]
self.showBoundingBoxFromAnnotationFile(prevFilePath)
self.saveFile()

def togglePaintLabelsOption(self):
for shape in self.canvas.shapes:
shape.paintLabel = self.displayLabelOption.isChecked()
Expand Down

0 comments on commit 08db03a

Please sign in to comment.