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

Method updateSymbolAndObjectDependentActions

src/gui/map/map_editor.cpp:2663–2680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2661}
2662
2663void MapEditorController::updateSymbolAndObjectDependentActions()
2664{
2665 const Symbol* single_symbol = activeSymbol();
2666 bool single_symbol_compatible = false;
2667 bool single_symbol_different = false;
2668 if (!editing_in_progress)
2669 {
2670 map->getSelectionToSymbolCompatibility(single_symbol, single_symbol_compatible, single_symbol_different);
2671 }
2672
2673 switch_symbol_act->setEnabled(single_symbol_compatible && single_symbol_different);
2674 switch_symbol_act->setStatusTip(tr("Switches the symbol of the selected objects to the selected symbol.") + (switch_symbol_act->isEnabled() ? QString{} : QString(QLatin1Char(' ') + tr("Select at least one object and a fitting, different symbol to activate this tool."))));
2675 fill_border_act->setEnabled(single_symbol_compatible && single_symbol_different);
2676 fill_border_act->setStatusTip(tr("Fill the selected lines or create a border for the selected areas.") + (fill_border_act->isEnabled() ? QString{} : QString(QLatin1Char(' ') + tr("Select at least one object and a fitting, different symbol to activate this tool."))));
2677 distribute_points_act->setEnabled(single_symbol && single_symbol->getType() == Symbol::Point
2678 && containsPathObject(map->selectedObjects()));
2679 distribute_points_act->setStatusTip(tr("Places evenly spaced point objects along an existing path object") + (distribute_points_act->isEnabled() ? QString{} : QString(QLatin1Char(' ') + tr("Select at least one path object and a single point symbol to activate this tool."))));
2680}
2681
2682void MapEditorController::undoStepAvailabilityChanged()
2683{

Callers

nothing calls this directly

Calls 5

containsPathObjectFunction · 0.85
QStringClass · 0.70
setEnabledMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected