提交 3fd40ba2 编写于 作者: M Michael Pitidis

Experiment with different enter label dialog

上级 dc9fa821
icons/delete.png

1.4 KB | W: | H:

icons/delete.png

1.5 KB | W: | H:

icons/delete.png
icons/delete.png
icons/delete.png
icons/delete.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -19,11 +19,11 @@ class LabelDialog(QDialog): ...@@ -19,11 +19,11 @@ class LabelDialog(QDialog):
self.edit.setText(text) self.edit.setText(text)
self.edit.setValidator(labelValidator()) self.edit.setValidator(labelValidator())
self.edit.editingFinished.connect(self.postProcess) self.edit.editingFinished.connect(self.postProcess)
layout = QHBoxLayout() layout = QVBoxLayout()
layout.addWidget(self.edit) layout.addWidget(self.edit)
delete = newButton('Delete', icon='delete', slot=self.delete) delete = newButton('Cancel\npolygon', icon='delete', slot=self.delete)
undo = newButton('Undo close', icon='undo', slot=self.undo) undo = newButton('Cancel\nlast line', icon='undo', slot=self.undo)
bb = BB(Qt.Vertical, self) bb = BB(Qt.Horizontal, self)
bb.addButton(BB.Ok) bb.addButton(BB.Ok)
bb.addButton(undo, BB.RejectRole) bb.addButton(undo, BB.RejectRole)
bb.addButton(delete, BB.RejectRole) bb.addButton(delete, BB.RejectRole)
......
...@@ -33,7 +33,7 @@ __appname__ = 'labelme' ...@@ -33,7 +33,7 @@ __appname__ = 'labelme'
# TODO: # TODO:
# - [medium] Zoom should keep the image centered. # - [medium] Zoom should keep the image centered.
# - [high] Label dialog options are vague. # - [high] Save per-shape colors in label file.
# - [high] Add recently opened files list in File menu. # - [high] Add recently opened files list in File menu.
# - [high] Escape should cancel editing mode if no point in canvas. # - [high] Escape should cancel editing mode if no point in canvas.
# - [medium] Maybe have separate colors for different shapes, and # - [medium] Maybe have separate colors for different shapes, and
...@@ -616,7 +616,7 @@ class MainWindow(QMainWindow, WindowMixin): ...@@ -616,7 +616,7 @@ class MainWindow(QMainWindow, WindowMixin):
def deleteSelectedShape(self): def deleteSelectedShape(self):
yes, no = QMessageBox.Yes, QMessageBox.No yes, no = QMessageBox.Yes, QMessageBox.No
msg = u'You are about to delete the polygon for ever, proceed anyway?' msg = u'You are about to permanently delete this polygon, proceed anyway?'
if yes == QMessageBox.warning(self, u'Attention', msg, yes|no): if yes == QMessageBox.warning(self, u'Attention', msg, yes|no):
self.remLabel(self.canvas.deleteSelected()) self.remLabel(self.canvas.deleteSelected())
self.setDirty() self.setDirty()
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<file alias="close">icons/close.png</file> <file alias="close">icons/close.png</file>
<file alias="fit-width">icons/fit-width.png</file> <file alias="fit-width">icons/fit-width.png</file>
<file alias="fit-window">icons/fit-window.png</file> <file alias="fit-window">icons/fit-window.png</file>
<file alias="undo">icons/undo.png</file>
<file alias="hide">icons/eye.png</file> <file alias="hide">icons/eye.png</file>
<file alias="quit">icons/quit.png</file> <file alias="quit">icons/quit.png</file>
<file alias="copy">icons/copy.png</file> <file alias="copy">icons/copy.png</file>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册