| 275 | } |
| 276 | |
| 277 | void EditLineTool::dragMove() |
| 278 | { |
| 279 | if (editingInProgress()) |
| 280 | { |
| 281 | if (snapped_to_pos && handle_offset != MapCoordF(0, 0)) |
| 282 | { |
| 283 | // Snapped to a position. Correct the handle offset, so the |
| 284 | // object moves to this position exactly. |
| 285 | click_pos_map += handle_offset; |
| 286 | object_mover->setStartPos(click_pos_map); |
| 287 | handle_offset = MapCoordF(0, 0); |
| 288 | } |
| 289 | |
| 290 | qint32 dx, dy; |
| 291 | object_mover->move(constrained_pos_map, ObjectMover::HandleOpMode::Never, &dx, &dy); |
| 292 | if (highlight_object) |
| 293 | { |
| 294 | highlight_renderables->removeRenderablesOfObject(highlight_object, false); |
| 295 | highlight_object->move(dx, dy); |
| 296 | highlight_object->update(); |
| 297 | highlight_renderables->insertRenderablesOfObject(highlight_object); |
| 298 | } |
| 299 | |
| 300 | updatePreviewObjectsAsynchronously(); |
| 301 | } |
| 302 | else if (box_selection) |
| 303 | { |
| 304 | updateDirtyRect(); |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | void EditLineTool::dragFinish() |
| 309 | { |
nothing calls this directly
no test coverage detected