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

Method initImpl

src/tools/cutout_tool.cpp:76–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void CutoutTool::initImpl()
77{
78 // Take cutout shape object out of the map
79 Q_ASSERT(map()->getNumSelectedObjects() == 1);
80 cutout_object = map()->getFirstSelectedObject()->asPath();
81
82 startEditing(cutout_object);
83 cutout_object->setSymbol(Map::getCoveringCombinedLine(), true);
84 updatePreviewObjects();
85
86 cutout_object_index = map()->getCurrentPart()->findObjectIndex(cutout_object);
87 map()->removeObjectFromSelection(cutout_object, true);
88 map()->releaseObject(cutout_object);
89}
90
91void CutoutTool::drawImpl(QPainter* painter, MapWidget* widget)
92{

Callers

nothing calls this directly

Calls 8

getNumSelectedObjectsMethod · 0.80
asPathMethod · 0.80
findObjectIndexMethod · 0.80
getCurrentPartMethod · 0.80
setSymbolMethod · 0.45
releaseObjectMethod · 0.45

Tested by

no test coverage detected