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

@@ -411,7 +411,9 @@ void TaskExtrudeParameters::onDirectionCBChanged(int num)
// to distinguish that this is the direction selection
selectionFace = false;
setDirectionMode(num);
TaskSketchBasedParameters::onSelectReference(true, true, false, true, true);
TaskSketchBasedParameters::onSelectReference(true, AllowSelection::EDGE |
AllowSelection::PLANAR |
AllowSelection::CIRCLE);
}
else {
if (lnk.getValue()) {
@@ -564,7 +566,7 @@ void TaskExtrudeParameters::onButtonFace(const bool pressed)
selectionFace = true;
// only faces are allowed
TaskSketchBasedParameters::onSelectReference(pressed, false, true, false);
TaskSketchBasedParameters::onSelectReference(pressed, AllowSelection::FACE);
// Update button if onButtonFace() is called explicitly
ui->buttonFace->setChecked(pressed);