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

Method objectSelectionChangedImpl

src/tools/scale_tool.cpp:190–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188
189
190void 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

Callers

nothing calls this directly

Calls 3

getNumSelectedObjectsMethod · 0.80
includeSelectionRectMethod · 0.80
centerMethod · 0.80

Tested by

no test coverage detected