Skip to content

Commit 2be8c24

Browse files
committed
[Fix] Remove confirmation status and "done" icon after image rotation
1 parent 71fb5d9 commit 2be8c24

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

PPOCRLabel.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,6 +1399,19 @@ def rotateImg(self, filename, k, _value):
13991399
ext = os.path.splitext(filename)[1]
14001400
cv2.imencode(ext, pix)[1].tofile(filename)
14011401
self.canvas.update()
1402+
1403+
# Remove confirmation status after rotation
1404+
img_idx = self.getImglabelidx(filename)
1405+
if img_idx in self.fileStatedict:
1406+
self.fileStatedict.pop(img_idx)
1407+
1408+
# Remove the "done" icon from the file list
1409+
if filename in self.mImgList:
1410+
currIndex = self.mImgList.index(filename)
1411+
item = self.fileListWidget.item(currIndex)
1412+
if item:
1413+
item.setIcon(QIcon())
1414+
14021415
self.loadFile(filename)
14031416

14041417
def rotateImgWarn(self):

0 commit comments

Comments
 (0)