Skip to content

Clip and Erase area tools ignore protected state of symbols #2401

@dl3sdo

Description

@dl3sdo

While the Clip and Erase area tools only operate on the current map part and thus all objects on other map parts are automatically protected, objects on the current map part with symbols being protected are affected by both tools however.

This is not (yet) a proposal to change the current behaviour.
Advantage:

  • If the user has protected a lot of symbols in order to not select them unintentionally while editing, it's easy to erase an area of the map without having first to unprotect all symbols, doing the erasure and then protecting those symbols again

Disadvantages:

  • It might be unexpected (and maybe even unnoticed, e.g., for objects with protected and hidden symbols)
  • It requires objects to be excluded from erasing to be moved to another map part

BTW: the behaviour can be easily changed,
in function void CutoutTool::apply(Map* map, PathObject* cutout_object, bool cut_away) the line
map->getCurrentPart()->applyOnAllObjects(std::ref(operation));
needs to be replaced by
map->getCurrentPart()->applyOnMatchingObjects(std::ref(operation), [](const Object* object) { return !object->getSymbol()->isProtected(); });

How is the experience with the current behaviour?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions