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

Method dragMove

src/tools/draw_text_tool.cpp:286–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286void DrawTextTool::dragMove()
287{
288 auto p1 = constrained_click_pos_map;
289 auto p2 = constrained_pos_map;
290 auto width = qAbs(p1.x() - p2.x());
291 auto height = qAbs(p1.y() - p2.y());
292 auto midpoint = MapCoord { (p1 + p2) / 2 };
293 preview_text->setBox(midpoint.nativeX(), midpoint.nativeY(), width, height);
294 updatePreviewText();
295 updateStatusText();
296}
297
298void DrawTextTool::dragFinish()
299{

Callers

nothing calls this directly

Calls 5

xMethod · 0.80
yMethod · 0.80
setBoxMethod · 0.80
nativeXMethod · 0.80
nativeYMethod · 0.80

Tested by

no test coverage detected