Skip to content

Commit

Permalink
[PD] Hole dialog fixes
Browse files Browse the repository at this point in the history
- when there is no profile the change of the hole cut type was not handled
- for the deprecated hole cut types it must also be possible to use custom values
  • Loading branch information
donovaly committed Jun 25, 2022
1 parent 1aa897d commit 360b428
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Mod/PartDesign/Gui/TaskHoleParameters.cpp
Expand Up @@ -368,6 +368,15 @@ void TaskHoleParameters::holeCutTypeChanged(int index)
if (HoleCutTypeString == "None" || HoleCutTypeString == "Counterbore"
|| HoleCutTypeString == "Countersink") {
ui->HoleCutCustomValues->setEnabled(false);
if (HoleCutTypeString == "None") {
ui->HoleCutDiameter->setEnabled(false);
ui->HoleCutDepth->setEnabled(false);
ui->HoleCutCountersinkAngle->setEnabled(false);
}
if (HoleCutTypeString == "Counterbore")
ui->HoleCutCountersinkAngle->setEnabled(false);
if (HoleCutTypeString == "Countersink")
ui->HoleCutCountersinkAngle->setEnabled(true);
}
else { // screw definition
// we can have the case that we have no normed values
Expand All @@ -379,6 +388,7 @@ void TaskHoleParameters::holeCutTypeChanged(int index)
ui->HoleCutCountersinkAngle->setEnabled(true);
}
else {
ui->HoleCutCustomValues->setEnabled(true);
ui->HoleCutDiameter->setEnabled(false);
ui->HoleCutDepth->setEnabled(false);
ui->HoleCutCountersinkAngle->setEnabled(false);
Expand Down

0 comments on commit 360b428

Please sign in to comment.