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

Method getDefaultDrawToolForSymbol

src/gui/map/map_editor.cpp:416–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414}
415
416MapEditorTool* MapEditorController::getDefaultDrawToolForSymbol(const Symbol* symbol)
417{
418 if (!symbol)
419 return new EditPointTool(this, edit_tool_act);
420 else if (symbol->getType() == Symbol::Point)
421 return new DrawPointTool(this, draw_point_act);
422 else if (symbol->getType() == Symbol::Line || symbol->getType() == Symbol::Area || symbol->getType() == Symbol::Combined)
423 return new DrawPathTool(this, draw_path_act, false, true);
424 else if (symbol->getType() == Symbol::Text)
425 return new DrawTextTool(this, draw_text_act);
426 else
427 Q_ASSERT(false);
428 return nullptr;
429}
430
431
432void MapEditorController::setEditingInProgress(bool value)

Callers 1

Calls 1

getTypeMethod · 0.45

Tested by

no test coverage detected