| 691 | } |
| 692 | |
| 693 | void 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 | |
| 721 | void DrawRectangleTool::updateStatusText() |
| 722 | { |
nothing calls this directly
no test coverage detected