[PD] Pad/pocket: fix wrong error message

- the error can also occur when the mode it not UpToFace (ToFirst or ToLast)
- also add note when Reversed checkbox is enabled since this is no obvious (as discussed in the forum)
- also some whitespace unification and include sorting
This commit is contained in:
Uwe
2022-12-04 05:18:36 +01:00
parent d02871298a
commit f79c66dc33
4 changed files with 13 additions and 11 deletions

View File

@@ -20,17 +20,17 @@
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
# include <Precision.hxx>
#endif
#include <Mod/PartDesign/App/FeaturePocket.h>
#include "ui_TaskPadPocketParameters.h"
#include "TaskPocketParameters.h"
using namespace PartDesignGui;
using namespace Gui;
@@ -108,8 +108,10 @@ void TaskPocketParameters::onModeChanged(int index)
pcPocket->Type.setValue("UpToFirst");
break;
case Modes::ToFace:
// Because of the code at the beginning of Pocket::execute() which is used to detect
// broken legacy parts, we must set the length to zero here!
// Note: ui->checkBoxReversed is purposely enabled because the selected face
// could be a circular one around the sketch
// Also note: Because of the code at the beginning of Pocket::execute() which is used
// to detect broken legacy parts, we must set the length to zero here!
oldLength = pcPocket->Length.getValue();
pcPocket->Type.setValue("UpToFace");
pcPocket->Length.setValue(0.0);