PD: cleanup the mess with boolean arguments and replace them with a bitmask

This commit is contained in:
wmayer
2021-12-03 14:46:19 +01:00
parent 9135b5ec90
commit b165947625
16 changed files with 113 additions and 56 deletions

View File

@@ -212,7 +212,9 @@ void TaskDraftParameters::onButtonPlane(bool checked)
hideObject();
selectionMode = plane;
Gui::Selection().clearSelection();
Gui::Selection().addSelectionGate(new ReferenceSelection(this->getBase(), true, true, true));
Gui::Selection().addSelectionGate(new ReferenceSelection(this->getBase(), AllowSelection::EDGE |
AllowSelection::FACE |
AllowSelection::PLANAR));
}
}
@@ -223,7 +225,8 @@ void TaskDraftParameters::onButtonLine(bool checked)
hideObject();
selectionMode = line;
Gui::Selection().clearSelection();
Gui::Selection().addSelectionGate(new ReferenceSelection(this->getBase(), true, false, true));
Gui::Selection().addSelectionGate(new ReferenceSelection(this->getBase(), AllowSelection::EDGE |
AllowSelection::PLANAR));
}
}