Skip to content

Commit

Permalink
Bug fixed (#99)
Browse files Browse the repository at this point in the history
* fixed error after delete image

* delete unused tooltip

* code style clear

* fix codestyle

---------

Co-authored-by: [email protected] <7p=e763wN3A6k+[C>
Co-authored-by: Wang Xin <[email protected]>
  • Loading branch information
yes-github and GreatV authored Oct 29, 2024
1 parent 476b4db commit 5915995
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 2 additions & 0 deletions PPOCRLabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2584,6 +2584,8 @@ def deleteImg(self):
imgidx = self.getImglabelidx(self.filePath)
if imgidx in self.PPlabel.keys():
self.PPlabel.pop(imgidx)

self.filePath = None
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

0 comments on commit 5915995

Please sign in to comment.