| 2661 | } |
| 2662 | |
| 2663 | void 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 | |
| 2682 | void MapEditorController::undoStepAvailabilityChanged() |
| 2683 | { |
nothing calls this directly
no test coverage detected