lazylabel-gui 1.1.0__py3-none-any.whl → 1.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lazylabel/__init__.py +8 -8
- lazylabel/config/__init__.py +6 -6
- lazylabel/config/hotkeys.py +168 -168
- lazylabel/config/paths.py +40 -40
- lazylabel/config/settings.py +65 -65
- lazylabel/core/__init__.py +6 -6
- lazylabel/core/file_manager.py +105 -105
- lazylabel/core/model_manager.py +97 -94
- lazylabel/core/segment_manager.py +171 -140
- lazylabel/main.py +36 -22
- lazylabel/models/__init__.py +4 -4
- lazylabel/models/sam_model.py +195 -154
- lazylabel/ui/__init__.py +7 -7
- lazylabel/ui/control_panel.py +241 -220
- lazylabel/ui/editable_vertex.py +64 -51
- lazylabel/ui/hotkey_dialog.py +383 -383
- lazylabel/ui/hoverable_pixelmap_item.py +22 -22
- lazylabel/ui/hoverable_polygon_item.py +39 -39
- lazylabel/ui/main_window.py +1659 -1264
- lazylabel/ui/numeric_table_widget_item.py +9 -9
- lazylabel/ui/photo_viewer.py +54 -54
- lazylabel/ui/reorderable_class_table.py +61 -61
- lazylabel/ui/right_panel.py +315 -239
- lazylabel/ui/widgets/__init__.py +8 -7
- lazylabel/ui/widgets/adjustments_widget.py +108 -107
- lazylabel/ui/widgets/model_selection_widget.py +93 -93
- lazylabel/ui/widgets/settings_widget.py +105 -105
- lazylabel/ui/widgets/status_bar.py +109 -0
- lazylabel/utils/__init__.py +5 -5
- lazylabel/utils/custom_file_system_model.py +132 -132
- lazylabel/utils/utils.py +12 -12
- {lazylabel_gui-1.1.0.dist-info → lazylabel_gui-1.1.2.dist-info}/METADATA +197 -197
- lazylabel_gui-1.1.2.dist-info/RECORD +37 -0
- {lazylabel_gui-1.1.0.dist-info → lazylabel_gui-1.1.2.dist-info}/licenses/LICENSE +21 -21
- lazylabel_gui-1.1.0.dist-info/RECORD +0 -36
- {lazylabel_gui-1.1.0.dist-info → lazylabel_gui-1.1.2.dist-info}/WHEEL +0 -0
- {lazylabel_gui-1.1.0.dist-info → lazylabel_gui-1.1.2.dist-info}/entry_points.txt +0 -0
- {lazylabel_gui-1.1.0.dist-info → lazylabel_gui-1.1.2.dist-info}/top_level.txt +0 -0
lazylabel/ui/control_panel.py
CHANGED
@@ -1,220 +1,241 @@
|
|
1
|
-
"""Left control panel with mode controls and settings."""
|
2
|
-
|
3
|
-
from PyQt6.QtWidgets import (
|
4
|
-
QWidget,
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
#
|
41
|
-
|
42
|
-
self.
|
43
|
-
self.
|
44
|
-
|
45
|
-
|
46
|
-
layout.
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
self.
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
#
|
62
|
-
self.
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
self.
|
80
|
-
main_layout.addSpacing(10)
|
81
|
-
|
82
|
-
#
|
83
|
-
self.
|
84
|
-
main_layout.addWidget(self.
|
85
|
-
|
86
|
-
#
|
87
|
-
|
88
|
-
main_layout.addWidget(self.
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
self.
|
97
|
-
self.
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
self.
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
self.
|
110
|
-
|
111
|
-
self.
|
112
|
-
self.
|
113
|
-
|
114
|
-
self.
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
"
|
123
|
-
|
124
|
-
self.
|
125
|
-
|
126
|
-
|
127
|
-
self.
|
128
|
-
|
129
|
-
self.
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
"
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
self.
|
155
|
-
|
156
|
-
|
157
|
-
self.
|
158
|
-
self.
|
159
|
-
self.
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
self.
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
self.
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
"
|
196
|
-
|
197
|
-
|
198
|
-
def
|
199
|
-
"""
|
200
|
-
|
201
|
-
|
202
|
-
def
|
203
|
-
"""Set
|
204
|
-
self.
|
205
|
-
|
206
|
-
def
|
207
|
-
"""Get current
|
208
|
-
return self.
|
209
|
-
|
210
|
-
def
|
211
|
-
"""Set
|
212
|
-
self.
|
213
|
-
|
214
|
-
def
|
215
|
-
"""
|
216
|
-
self.
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
1
|
+
"""Left control panel with mode controls and settings."""
|
2
|
+
|
3
|
+
from PyQt6.QtWidgets import (
|
4
|
+
QWidget,
|
5
|
+
QVBoxLayout,
|
6
|
+
QPushButton,
|
7
|
+
QLabel,
|
8
|
+
QFrame,
|
9
|
+
QHBoxLayout,
|
10
|
+
QCheckBox,
|
11
|
+
QSlider,
|
12
|
+
QGroupBox,
|
13
|
+
QComboBox,
|
14
|
+
)
|
15
|
+
from PyQt6.QtCore import Qt, pyqtSignal
|
16
|
+
|
17
|
+
from .widgets import ModelSelectionWidget, SettingsWidget, AdjustmentsWidget
|
18
|
+
|
19
|
+
|
20
|
+
class ControlPanel(QWidget):
|
21
|
+
"""Left control panel with mode controls and settings."""
|
22
|
+
|
23
|
+
# Signals
|
24
|
+
sam_mode_requested = pyqtSignal()
|
25
|
+
polygon_mode_requested = pyqtSignal()
|
26
|
+
selection_mode_requested = pyqtSignal()
|
27
|
+
clear_points_requested = pyqtSignal()
|
28
|
+
fit_view_requested = pyqtSignal()
|
29
|
+
browse_models_requested = pyqtSignal()
|
30
|
+
refresh_models_requested = pyqtSignal()
|
31
|
+
model_selected = pyqtSignal(str)
|
32
|
+
annotation_size_changed = pyqtSignal(int)
|
33
|
+
pan_speed_changed = pyqtSignal(int)
|
34
|
+
join_threshold_changed = pyqtSignal(int)
|
35
|
+
hotkeys_requested = pyqtSignal()
|
36
|
+
pop_out_requested = pyqtSignal()
|
37
|
+
|
38
|
+
def __init__(self, parent=None):
|
39
|
+
super().__init__(parent)
|
40
|
+
self.setMinimumWidth(50) # Allow collapsing but maintain minimum
|
41
|
+
self.preferred_width = 250 # Store preferred width for expansion
|
42
|
+
self._setup_ui()
|
43
|
+
self._connect_signals()
|
44
|
+
|
45
|
+
def _setup_ui(self):
|
46
|
+
"""Setup the UI layout."""
|
47
|
+
layout = QVBoxLayout(self)
|
48
|
+
layout.setAlignment(Qt.AlignmentFlag.AlignTop)
|
49
|
+
|
50
|
+
# Top button row
|
51
|
+
toggle_layout = QHBoxLayout()
|
52
|
+
toggle_layout.addStretch()
|
53
|
+
|
54
|
+
self.btn_popout = QPushButton("⋯")
|
55
|
+
self.btn_popout.setToolTip("Pop out panel to separate window")
|
56
|
+
self.btn_popout.setMaximumWidth(30)
|
57
|
+
toggle_layout.addWidget(self.btn_popout)
|
58
|
+
|
59
|
+
layout.addLayout(toggle_layout)
|
60
|
+
|
61
|
+
# Main controls widget
|
62
|
+
self.main_controls_widget = QWidget()
|
63
|
+
main_layout = QVBoxLayout(self.main_controls_widget)
|
64
|
+
main_layout.setContentsMargins(0, 0, 0, 0)
|
65
|
+
|
66
|
+
# Mode label
|
67
|
+
self.mode_label = QLabel("Mode: Points")
|
68
|
+
font = self.mode_label.font()
|
69
|
+
font.setPointSize(14)
|
70
|
+
font.setBold(True)
|
71
|
+
self.mode_label.setFont(font)
|
72
|
+
main_layout.addWidget(self.mode_label)
|
73
|
+
|
74
|
+
# Mode buttons
|
75
|
+
self._add_mode_buttons(main_layout)
|
76
|
+
|
77
|
+
# Separator
|
78
|
+
main_layout.addSpacing(20)
|
79
|
+
main_layout.addWidget(self._create_separator())
|
80
|
+
main_layout.addSpacing(10)
|
81
|
+
|
82
|
+
# Model selection
|
83
|
+
self.model_widget = ModelSelectionWidget()
|
84
|
+
main_layout.addWidget(self.model_widget)
|
85
|
+
|
86
|
+
# Separator
|
87
|
+
main_layout.addSpacing(10)
|
88
|
+
main_layout.addWidget(self._create_separator())
|
89
|
+
main_layout.addSpacing(10)
|
90
|
+
|
91
|
+
# Action buttons
|
92
|
+
self._add_action_buttons(main_layout)
|
93
|
+
main_layout.addSpacing(10)
|
94
|
+
|
95
|
+
# Settings
|
96
|
+
self.settings_widget = SettingsWidget()
|
97
|
+
main_layout.addWidget(self.settings_widget)
|
98
|
+
|
99
|
+
# Adjustments
|
100
|
+
self.adjustments_widget = AdjustmentsWidget()
|
101
|
+
main_layout.addWidget(self.adjustments_widget)
|
102
|
+
|
103
|
+
main_layout.addStretch()
|
104
|
+
|
105
|
+
# Status labels
|
106
|
+
self.notification_label = QLabel("")
|
107
|
+
font = self.notification_label.font()
|
108
|
+
font.setItalic(True)
|
109
|
+
self.notification_label.setFont(font)
|
110
|
+
self.notification_label.setStyleSheet("color: #ffa500;")
|
111
|
+
self.notification_label.setWordWrap(True)
|
112
|
+
main_layout.addWidget(self.notification_label)
|
113
|
+
|
114
|
+
layout.addWidget(self.main_controls_widget)
|
115
|
+
|
116
|
+
def _add_mode_buttons(self, layout):
|
117
|
+
"""Add mode control buttons."""
|
118
|
+
self.btn_sam_mode = QPushButton("Point Mode (1)")
|
119
|
+
self.btn_sam_mode.setToolTip("Switch to Point Mode for AI segmentation (1)")
|
120
|
+
|
121
|
+
self.btn_polygon_mode = QPushButton("Polygon Mode (2)")
|
122
|
+
self.btn_polygon_mode.setToolTip("Switch to Polygon Drawing Mode (2)")
|
123
|
+
|
124
|
+
self.btn_selection_mode = QPushButton("Selection Mode (E)")
|
125
|
+
self.btn_selection_mode.setToolTip("Toggle segment selection (E)")
|
126
|
+
|
127
|
+
layout.addWidget(self.btn_sam_mode)
|
128
|
+
layout.addWidget(self.btn_polygon_mode)
|
129
|
+
layout.addWidget(self.btn_selection_mode)
|
130
|
+
|
131
|
+
def _add_action_buttons(self, layout):
|
132
|
+
"""Add action buttons."""
|
133
|
+
self.btn_fit_view = QPushButton("Fit View (.)")
|
134
|
+
self.btn_fit_view.setToolTip("Reset image zoom and pan to fit the view (.)")
|
135
|
+
|
136
|
+
self.btn_clear_points = QPushButton("Clear Clicks (C)")
|
137
|
+
self.btn_clear_points.setToolTip("Clear current temporary points/vertices (C)")
|
138
|
+
|
139
|
+
self.btn_hotkeys = QPushButton("Hotkeys")
|
140
|
+
self.btn_hotkeys.setToolTip("Configure keyboard shortcuts")
|
141
|
+
|
142
|
+
layout.addWidget(self.btn_fit_view)
|
143
|
+
layout.addWidget(self.btn_clear_points)
|
144
|
+
layout.addWidget(self.btn_hotkeys)
|
145
|
+
|
146
|
+
def _create_separator(self):
|
147
|
+
"""Create a horizontal separator line."""
|
148
|
+
line = QFrame()
|
149
|
+
line.setFrameShape(QFrame.Shape.HLine)
|
150
|
+
return line
|
151
|
+
|
152
|
+
def _connect_signals(self):
|
153
|
+
"""Connect internal signals."""
|
154
|
+
self.btn_sam_mode.clicked.connect(self.sam_mode_requested)
|
155
|
+
self.btn_polygon_mode.clicked.connect(self.polygon_mode_requested)
|
156
|
+
self.btn_selection_mode.clicked.connect(self.selection_mode_requested)
|
157
|
+
self.btn_clear_points.clicked.connect(self.clear_points_requested)
|
158
|
+
self.btn_fit_view.clicked.connect(self.fit_view_requested)
|
159
|
+
self.btn_hotkeys.clicked.connect(self.hotkeys_requested)
|
160
|
+
self.btn_popout.clicked.connect(self.pop_out_requested)
|
161
|
+
|
162
|
+
# Model widget signals
|
163
|
+
self.model_widget.browse_requested.connect(self.browse_models_requested)
|
164
|
+
self.model_widget.refresh_requested.connect(self.refresh_models_requested)
|
165
|
+
self.model_widget.model_selected.connect(self.model_selected)
|
166
|
+
|
167
|
+
# Adjustments widget signals
|
168
|
+
self.adjustments_widget.annotation_size_changed.connect(
|
169
|
+
self.annotation_size_changed
|
170
|
+
)
|
171
|
+
self.adjustments_widget.pan_speed_changed.connect(self.pan_speed_changed)
|
172
|
+
self.adjustments_widget.join_threshold_changed.connect(
|
173
|
+
self.join_threshold_changed
|
174
|
+
)
|
175
|
+
|
176
|
+
def mouseDoubleClickEvent(self, event):
|
177
|
+
"""Handle double-click to expand collapsed panel."""
|
178
|
+
if self.width() < 50: # If panel is collapsed
|
179
|
+
# Request expansion by calling parent method
|
180
|
+
if self.parent() and hasattr(self.parent(), "_expand_left_panel"):
|
181
|
+
self.parent()._expand_left_panel()
|
182
|
+
super().mouseDoubleClickEvent(event)
|
183
|
+
|
184
|
+
def show_notification(self, message: str, duration: int = 3000):
|
185
|
+
"""Show a notification message."""
|
186
|
+
self.notification_label.setText(message)
|
187
|
+
# Note: Timer should be handled by the caller
|
188
|
+
|
189
|
+
def clear_notification(self):
|
190
|
+
"""Clear the notification message."""
|
191
|
+
self.notification_label.clear()
|
192
|
+
|
193
|
+
def set_mode_text(self, mode: str):
|
194
|
+
"""Set the mode label text."""
|
195
|
+
self.mode_label.setText(f"Mode: {mode.replace('_', ' ').title()}")
|
196
|
+
|
197
|
+
# Delegate methods for sub-widgets
|
198
|
+
def populate_models(self, models):
|
199
|
+
"""Populate the models combo box."""
|
200
|
+
self.model_widget.populate_models(models)
|
201
|
+
|
202
|
+
def set_current_model(self, model_name):
|
203
|
+
"""Set the current model display."""
|
204
|
+
self.model_widget.set_current_model(model_name)
|
205
|
+
|
206
|
+
def get_settings(self):
|
207
|
+
"""Get current settings from the settings widget."""
|
208
|
+
return self.settings_widget.get_settings()
|
209
|
+
|
210
|
+
def set_settings(self, settings):
|
211
|
+
"""Set settings in the settings widget."""
|
212
|
+
self.settings_widget.set_settings(settings)
|
213
|
+
|
214
|
+
def get_annotation_size(self):
|
215
|
+
"""Get current annotation size."""
|
216
|
+
return self.adjustments_widget.get_annotation_size()
|
217
|
+
|
218
|
+
def set_annotation_size(self, value):
|
219
|
+
"""Set annotation size."""
|
220
|
+
self.adjustments_widget.set_annotation_size(value)
|
221
|
+
|
222
|
+
def set_join_threshold(self, value):
|
223
|
+
"""Set join threshold."""
|
224
|
+
self.adjustments_widget.set_join_threshold(value)
|
225
|
+
|
226
|
+
def set_sam_mode_enabled(self, enabled: bool):
|
227
|
+
"""Enable or disable the SAM mode button."""
|
228
|
+
self.btn_sam_mode.setEnabled(enabled)
|
229
|
+
if not enabled:
|
230
|
+
self.btn_sam_mode.setToolTip("Point Mode (SAM model not available)")
|
231
|
+
else:
|
232
|
+
self.btn_sam_mode.setToolTip("Switch to Point Mode for AI segmentation (1)")
|
233
|
+
|
234
|
+
def set_popout_mode(self, is_popped_out: bool):
|
235
|
+
"""Update the pop-out button based on panel state."""
|
236
|
+
if is_popped_out:
|
237
|
+
self.btn_popout.setText("⇤")
|
238
|
+
self.btn_popout.setToolTip("Return panel to main window")
|
239
|
+
else:
|
240
|
+
self.btn_popout.setText("⋯")
|
241
|
+
self.btn_popout.setToolTip("Pop out panel to separate window")
|
lazylabel/ui/editable_vertex.py
CHANGED
@@ -1,51 +1,64 @@
|
|
1
|
-
from PyQt6.QtWidgets import QGraphicsEllipseItem, QGraphicsItem
|
2
|
-
from PyQt6.QtCore import Qt
|
3
|
-
from PyQt6.QtGui import QBrush, QPen, QColor
|
4
|
-
|
5
|
-
|
6
|
-
class EditableVertexItem(QGraphicsEllipseItem):
|
7
|
-
def __init__(self, main_window, segment_index, vertex_index, x, y, w, h):
|
8
|
-
super().__init__(x, y, w, h)
|
9
|
-
self.main_window = main_window
|
10
|
-
self.segment_index = segment_index
|
11
|
-
self.vertex_index = vertex_index
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
color.
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
self.setFlag(QGraphicsItem.GraphicsItemFlag.
|
24
|
-
self.setFlag(QGraphicsItem.GraphicsItemFlag.
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
1
|
+
from PyQt6.QtWidgets import QGraphicsEllipseItem, QGraphicsItem
|
2
|
+
from PyQt6.QtCore import Qt
|
3
|
+
from PyQt6.QtGui import QBrush, QPen, QColor
|
4
|
+
|
5
|
+
|
6
|
+
class EditableVertexItem(QGraphicsEllipseItem):
|
7
|
+
def __init__(self, main_window, segment_index, vertex_index, x, y, w, h):
|
8
|
+
super().__init__(x, y, w, h)
|
9
|
+
self.main_window = main_window
|
10
|
+
self.segment_index = segment_index
|
11
|
+
self.vertex_index = vertex_index
|
12
|
+
self.initial_pos = None
|
13
|
+
|
14
|
+
self.setZValue(200)
|
15
|
+
|
16
|
+
color = QColor(Qt.GlobalColor.cyan)
|
17
|
+
color.setAlpha(180)
|
18
|
+
self.setBrush(QBrush(color))
|
19
|
+
|
20
|
+
self.setPen(QPen(Qt.GlobalColor.transparent))
|
21
|
+
|
22
|
+
# Set flags for dragging - use the original working approach
|
23
|
+
self.setFlag(QGraphicsItem.GraphicsItemFlag.ItemIsMovable)
|
24
|
+
self.setFlag(QGraphicsItem.GraphicsItemFlag.ItemSendsGeometryChanges)
|
25
|
+
self.setFlag(QGraphicsItem.GraphicsItemFlag.ItemIsSelectable)
|
26
|
+
|
27
|
+
# Accept mouse events
|
28
|
+
self.setAcceptHoverEvents(True)
|
29
|
+
|
30
|
+
def itemChange(self, change, value):
|
31
|
+
if change == QGraphicsItem.GraphicsItemChange.ItemPositionHasChanged:
|
32
|
+
new_pos = value
|
33
|
+
if hasattr(self.main_window, "update_vertex_pos"):
|
34
|
+
self.main_window.update_vertex_pos(
|
35
|
+
self.segment_index, self.vertex_index, new_pos, record_undo=False
|
36
|
+
)
|
37
|
+
return super().itemChange(change, value)
|
38
|
+
|
39
|
+
def mousePressEvent(self, event):
|
40
|
+
"""Handle mouse press events."""
|
41
|
+
self.initial_pos = self.pos()
|
42
|
+
super().mousePressEvent(event)
|
43
|
+
event.accept()
|
44
|
+
|
45
|
+
def mouseMoveEvent(self, event):
|
46
|
+
"""Handle mouse move events."""
|
47
|
+
super().mouseMoveEvent(event)
|
48
|
+
event.accept()
|
49
|
+
|
50
|
+
def mouseReleaseEvent(self, event):
|
51
|
+
"""Handle mouse release events."""
|
52
|
+
if self.initial_pos and self.initial_pos != self.pos():
|
53
|
+
self.main_window.action_history.append(
|
54
|
+
{
|
55
|
+
"type": "move_vertex",
|
56
|
+
"segment_index": self.segment_index,
|
57
|
+
"vertex_index": self.vertex_index,
|
58
|
+
"old_pos": self.initial_pos,
|
59
|
+
"new_pos": self.pos(),
|
60
|
+
}
|
61
|
+
)
|
62
|
+
self.initial_pos = None
|
63
|
+
super().mouseReleaseEvent(event)
|
64
|
+
event.accept()
|