MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / dragMove

Method dragMove

src/tools/edit_point_tool.cpp:354–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

352}
353
354void EditPointTool::dragMove()
355{
356 if (editingInProgress())
357 {
358 if (snapped_to_pos && handle_offset != MapCoordF(0, 0))
359 {
360 // Snapped to a position. Correct the handle offset, so the
361 // object moves to this position exactly.
362 click_pos_map += handle_offset;
363 object_mover->setStartPos(click_pos_map);
364 handle_offset = MapCoordF(0, 0);
365 }
366
367 object_mover->move(constrained_pos_map,
368 moveOppositeHandle() ? ObjectMover::HandleOpMode::Click : ObjectMover::HandleOpMode::Never);
369 updatePreviewObjectsAsynchronously();
370 }
371 else if (box_selection)
372 {
373 updateDirtyRect();
374 }
375}
376
377void EditPointTool::dragFinish()
378{

Callers

nothing calls this directly

Calls 3

setStartPosMethod · 0.80
MapCoordFClass · 0.70
moveMethod · 0.45

Tested by

no test coverage detected