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

Method invertSelection

src/gui/map/map_editor.cpp:3055–3070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3053}
3054
3055void MapEditorController::invertSelection()
3056{
3057 auto selection = Map::ObjectSelection{ map->selectedObjects() };
3058 map->clearObjectSelection(false);
3059 map->getCurrentPart()->applyOnAllObjects([this, &selection](Object* object) {
3060 if (selection.find(object) == end(selection))
3061 map->addObjectToSelection(object, false);
3062 });
3063
3064 if (map->getCurrentPart()->getNumObjects() > 0)
3065 {
3066 map->emitSelectionChanged();
3067 if (current_tool && current_tool->isDrawTool())
3068 setEditTool();
3069 }
3070}
3071
3072void MapEditorController::selectByCurrentSymbols()
3073{

Callers

nothing calls this directly

Calls 8

clearObjectSelectionMethod · 0.80
getCurrentPartMethod · 0.80
addObjectToSelectionMethod · 0.80
emitSelectionChangedMethod · 0.80
isDrawToolMethod · 0.80
applyOnAllObjectsMethod · 0.45
findMethod · 0.45
getNumObjectsMethod · 0.45

Tested by

no test coverage detected