提交 4ab0e9a7 编写于 作者: K Kentaro Wada

Minor fix

上级 ac5ae220
......@@ -9,4 +9,3 @@
.DS_Store
.idea/
create_labelme_env.bat
# -*- mode: python -*-
# vim: ft=python
block_cipher = None
......@@ -32,7 +33,7 @@ exe = EXE(
strip=False,
upx=True,
runtime_tmpdir=None,
console=True,
console=False,
icon='labelme/icons/icon.ico',
)
app = BUNDLE(
......
......@@ -52,7 +52,7 @@ class MainWindow(QtWidgets.QMainWindow):
output=None,
output_file=None,
output_dir=None,
):
):
if output is not None:
logger.warning(
'argument output is deprecated, use output_file instead'
......@@ -340,10 +340,13 @@ class MainWindow(QtWidgets.QMainWindow):
self.tr('Add point to the nearest edge'),
enabled=False,
)
removePoint = action('Remove Selected Point', self.canvas.removeSelectedPoint,
None, 'edit', 'Remove selected point from polygon',
enabled=False)
removePoint = action(
text='Remove Selected Point',
slot=self.canvas.removeSelectedPoint,
icon='edit',
tip='Remove selected point from polygon',
enabled=False,
)
undo = action(self.tr('Undo'), self.undoShapeEdit,
shortcuts['undo'], 'undo',
......@@ -802,9 +805,6 @@ class MainWindow(QtWidgets.QMainWindow):
url = 'https://github.com/wkentaro/labelme/tree/master/examples/tutorial' # NOQA
webbrowser.open(url)
def toggleRemovePointEnabled(self, enabled):
self.actions.removePoint.setEnabled(enabled)
def toggleDrawingSensitive(self, drawing=True):
"""Toggle drawing sensitive.
......
auto_save: false
display_label_popup: true
instance_label_auto_increment: true
store_data: false
store_data: true
keep_prev: false
logger_level: info
......
......@@ -358,13 +358,12 @@ class Canvas(QtWidgets.QWidget):
self.repaint()
elif ev.button() == QtCore.Qt.LeftButton and self.selectedShapes:
self.overrideCursor(CURSOR_GRAB)
if self.movingShape:
# Only save if changes have actually been made
if self.hShape is not None:
currentShapeIndex = self.shapes.index(self.hShape)
if not self.shapesBackups[-1][currentShapeIndex].points == self.shapes[currentShapeIndex].points:
self.storeShapes()
self.shapeMoved.emit()
if self.movingShape and self.hShape:
index = self.shapes.index(self.hShape)
if (self.shapesBackups[-1][index].points !=
self.shapes[index].points):
self.storeShapes()
self.shapeMoved.emit()
def endMove(self, copy):
assert self.selectedShapes and self.selectedShapesCopy
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册