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

Method updateDirtyRect

src/tools/draw_rectangle_tool.cpp:693–719  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

691}
692
693void DrawRectangleTool::updateDirtyRect()
694{
695 QRectF rect;
696 includePreviewRects(rect);
697
698 if (shift_pressed)
699 snap_helper->includeDirtyRect(rect);
700 if (is_helper_tool)
701 emit dirtyRectChanged(rect);
702 else
703 {
704 if (angle_helper->isActive())
705 angle_helper->includeDirtyRect(rect);
706 if (rect.isValid())
707 {
708 int pixel_border = 0;
709 if (editingInProgress())
710 // helper_cross_radius as border is less than ideal but the only way to always ensure visibility of the helper cross at the moment
711 pixel_border = qCeil(Settings::getInstance().getRectangleToolHelperCrossRadiusPx());
712 if (angle_helper->isActive())
713 pixel_border = qMax(pixel_border, angle_helper->getDisplayRadius());
714 map()->setDrawingBoundingBox(rect, pixel_border, true);
715 }
716 else
717 map()->clearDrawingBoundingBox();
718 }
719}
720
721void DrawRectangleTool::updateStatusText()
722{

Callers

nothing calls this directly

Calls 7

includeDirtyRectMethod · 0.45
isActiveMethod · 0.45
isValidMethod · 0.45
getDisplayRadiusMethod · 0.45
setDrawingBoundingBoxMethod · 0.45

Tested by

no test coverage detected