| 188 | |
| 189 | |
| 190 | void ScaleTool::objectSelectionChangedImpl() |
| 191 | { |
| 192 | if (editingInProgress()) |
| 193 | { |
| 194 | abortEditing(); |
| 195 | cancelDragging(); |
| 196 | } |
| 197 | |
| 198 | if (map()->getNumSelectedObjects() == 0) |
| 199 | { |
| 200 | deactivate(); |
| 201 | } |
| 202 | else |
| 203 | { |
| 204 | // Set initial scaling center to the center of the bounding box of the selected objects |
| 205 | QRectF rect; |
| 206 | map()->includeSelectionRect(rect); |
| 207 | scaling_center = rect.center(); |
| 208 | |
| 209 | updateDirtyRect(); |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | |
| 214 | } // namespace OpenOrienteering |
nothing calls this directly
no test coverage detected