Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixed #99

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion PPOCRLabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,9 @@ def openDatasetDirDialog(self):

else:
if self.lang == "ch":
self.msgBox.warning(self, "提示", "\n 原文件夹已不存在,请从新选择数据集路径!")
self.msgBox.warning(
self, "提示", "\n 原文件夹已不存在,请从新选择数据集路径!"
)
else:
self.msgBox.warning(
self,
Expand Down Expand Up @@ -2584,6 +2586,8 @@ def deleteImg(self):
imgidx = self.getImglabelidx(self.filePath)
if imgidx in self.PPlabel.keys():
self.PPlabel.pop(imgidx)

self.filePath = None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修复删除图片导致的bug,是通过这一行实现的吗

self.openNextImg()
self.importDirImages(self.lastOpenDir, isDelete=True)

Expand Down
5 changes: 0 additions & 5 deletions libs/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ def mouseMoveEvent(self, ev):
# - Highlight shapes
# - Highlight vertex
# Update shape/vertex fill and tooltip value accordingly.
# self.setToolTip("Image")
for shape in reversed([s for s in self.shapes if self.isVisible(s)]):
# Look for a nearby vertex to highlight. If that fails,
# check if we happen to be inside a shape.
Expand All @@ -231,8 +230,6 @@ def mouseMoveEvent(self, ev):
self.hVertex, self.hShape = index, shape
shape.highlightVertex(index, shape.MOVE_VERTEX)
self.overrideCursor(CURSOR_POINT)
self.setToolTip("Click & drag to move point")
self.setStatusTip(self.toolTip())
self.update()
break
else:
Expand All @@ -241,8 +238,6 @@ def mouseMoveEvent(self, ev):
if self.selectedVertex():
self.hShape.highlightClear()
self.hVertex, self.hShape = None, shape
self.setToolTip("Click & drag to move shape '%s'" % shape.label)
self.setStatusTip(self.toolTip())
self.overrideCursor(CURSOR_GRAB)
self.update()
break
Expand Down
Loading