Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
e0ae8b44
Commit
e0ae8b44
authored
Jul 22, 2021
by
Alchemist_W
Browse files
在菜单edit和鼠标右键 增加图片左右旋转功能 且有标注框的情况下不可以旋转
parent
4df7ada9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
14 deletions
+28
-14
PPOCRLabel/PPOCRLabel.py
PPOCRLabel/PPOCRLabel.py
+28
-14
No files found.
PPOCRLabel/PPOCRLabel.py
View file @
e0ae8b44
...
@@ -800,6 +800,13 @@ class MainWindow(QMainWindow, WindowMixin):
...
@@ -800,6 +800,13 @@ class MainWindow(QMainWindow, WindowMixin):
filename
=
self
.
mImgList
[
self
.
currIndex
]
filename
=
self
.
mImgList
[
self
.
currIndex
]
if
os
.
path
.
exists
(
filename
):
if
os
.
path
.
exists
(
filename
):
if
self
.
itemsToShapesbox
:
if
self
.
lang
==
'ch'
:
self
.
msgBox
.
warning
(
self
,
"提示"
,
"
\n
该图片已经有标注框,旋转操作会打乱标注,建议清除标注框后旋转。"
)
else
:
self
.
msgBox
.
warning
(
self
,
"Warn"
,
"
\n
The picture already has a label box, and rotation will disrupt the label.
\
It is recommended to clear the label box and rotate it."
)
else
:
_value
=
True
_value
=
True
self
.
actions
.
rotateLeft
.
setEnabled
(
_value
)
self
.
actions
.
rotateLeft
.
setEnabled
(
_value
)
pix
=
cv2
.
imread
(
filename
)
pix
=
cv2
.
imread
(
filename
)
...
@@ -821,6 +828,13 @@ class MainWindow(QMainWindow, WindowMixin):
...
@@ -821,6 +828,13 @@ class MainWindow(QMainWindow, WindowMixin):
filename
=
self
.
mImgList
[
self
.
currIndex
]
filename
=
self
.
mImgList
[
self
.
currIndex
]
if
os
.
path
.
exists
(
filename
):
if
os
.
path
.
exists
(
filename
):
if
self
.
itemsToShapesbox
:
if
self
.
lang
==
'ch'
:
self
.
msgBox
.
warning
(
self
,
"提示"
,
"
\n
该图片已经有标注框,旋转操作会打乱标注,建议清除标注框后旋转。"
)
else
:
self
.
msgBox
.
warning
(
self
,
"Warn"
,
"
\n
The picture already has a label box, and rotation will disrupt the label.
\
It is recommended to clear the label box and rotate it."
)
else
:
_value
=
True
_value
=
True
self
.
actions
.
rotateRight
.
setEnabled
(
_value
)
self
.
actions
.
rotateRight
.
setEnabled
(
_value
)
pix
=
cv2
.
imread
(
filename
)
pix
=
cv2
.
imread
(
filename
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment