提交 a79b0df3 编写于 作者: K Kentaro Wada

Simplify self.labelItemChanged in app.py

上级 dc5e5ec3
......@@ -1137,12 +1137,7 @@ class MainWindow(QtWidgets.QMainWindow):
def labelItemChanged(self, item):
shape = self.labelList.get_shape_from_item(item)
label = str(item.text())
if label != shape.label:
shape.label = str(item.text())
self.setDirty()
else: # User probably changed item visibility
self.canvas.setShapeVisible(shape, item.checkState() == Qt.Checked)
self.canvas.setShapeVisible(shape, item.checkState() == Qt.Checked)
# Callback functions:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册