From 34f56bf31f0cb82d0cff586b2c2fddf206a68d8a Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Thu, 26 Nov 2020 07:46:21 +0800 Subject: [PATCH] PartDesign: remove unused FitIntersection from sketch based feature --- src/Mod/PartDesign/App/FeatureSketchBased.cpp | 3 +-- src/Mod/PartDesign/App/FeatureSketchBased.h | 1 - .../PartDesign/Gui/TaskSketchBasedParameters.cpp | 15 --------------- .../PartDesign/Gui/TaskSketchBasedParameters.h | 2 -- 4 files changed, 1 insertion(+), 20 deletions(-) diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.cpp b/src/Mod/PartDesign/App/FeatureSketchBased.cpp index b76fa6b71e15..076809a812cf 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.cpp +++ b/src/Mod/PartDesign/App/FeatureSketchBased.cpp @@ -102,7 +102,6 @@ ProfileBased::ProfileBased() ADD_PROPERTY_TYPE(Fit, (0.0), "SketchBased", App::Prop_None, "Shrink or expand the profile for fitting"); ADD_PROPERTY_TYPE(FitJoin,(long(0)),"SketchBased",App::Prop_None,"Fit join type"); FitJoin.setEnums(Part::Offset::JoinEnums); - ADD_PROPERTY_TYPE(FitIntersection,(false),"SketchBased",App::Prop_None,"Fit intersection"); } short ProfileBased::mustExecute() const @@ -243,7 +242,7 @@ TopoShape ProfileBased::getVerifiedFace(bool silent) const { static_cast(FitJoin.getValue()), false, false, - FitIntersection.getValue()); + false); } if(count>1) { diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.h b/src/Mod/PartDesign/App/FeatureSketchBased.h index b218708b3c85..db82925ba4ad 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.h +++ b/src/Mod/PartDesign/App/FeatureSketchBased.h @@ -61,7 +61,6 @@ class PartDesignExport ProfileBased : public PartDesign::FeatureAddSub App::PropertyDistance Fit; App::PropertyEnumeration FitJoin; - App::PropertyBool FitIntersection; short mustExecute() const; diff --git a/src/Mod/PartDesign/Gui/TaskSketchBasedParameters.cpp b/src/Mod/PartDesign/Gui/TaskSketchBasedParameters.cpp index aeea80b2be1e..819a38a14904 100644 --- a/src/Mod/PartDesign/Gui/TaskSketchBasedParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskSketchBasedParameters.cpp @@ -106,10 +106,6 @@ void TaskSketchBasedParameters::initUI(QWidget *widget) { layout->addWidget(fitJoinType); boxLayout->addLayout(layout); - fitIntersection = new QCheckBox(tr("Fit intersection"), this); - connect(fitIntersection, SIGNAL(toggled(bool)), this, SLOT(onFitIntersectionChanged(bool))); - boxLayout->addWidget(fitIntersection); - addUpdateViewCheckBox(widget); } @@ -129,10 +125,6 @@ void TaskSketchBasedParameters::refresh() fitJoinType->setCurrentIndex(pcSketchBased->FitJoin.getValue()); } - if (fitIntersection) { - QSignalBlocker guard(fitIntersection); - fitIntersection->setChecked(pcSketchBased->FitIntersection.getValue()); - } TaskFeatureParameters::refresh(); } @@ -150,13 +142,6 @@ void TaskSketchBasedParameters::onFitChanged(double v) recomputeFeature(); } -void TaskSketchBasedParameters::onFitIntersectionChanged(bool checked) -{ - PartDesign::ProfileBased* pcSketchBased = static_cast(vp->getObject()); - pcSketchBased->FitIntersection.setValue(checked); - recomputeFeature(); -} - void TaskSketchBasedParameters::onFitJoinChanged(int v) { PartDesign::ProfileBased* pcSketchBased = static_cast(vp->getObject()); diff --git a/src/Mod/PartDesign/Gui/TaskSketchBasedParameters.h b/src/Mod/PartDesign/Gui/TaskSketchBasedParameters.h index 71a424e84a04..1cdf0b7ab199 100644 --- a/src/Mod/PartDesign/Gui/TaskSketchBasedParameters.h +++ b/src/Mod/PartDesign/Gui/TaskSketchBasedParameters.h @@ -75,11 +75,9 @@ class TaskSketchBasedParameters : public PartDesignGui::TaskFeatureParameters, protected Q_SLOTS: void onFitChanged(double); void onFitJoinChanged(int); - void onFitIntersectionChanged(bool); protected: Gui::PrefQuantitySpinBox * fitEdit = nullptr; - QCheckBox *fitIntersection = nullptr; QComboBox *fitJoinType = nullptr; };