PartDesign: [skip ci] support negative values as second length of a pocket

This commit is contained in:
wmayer
2020-11-16 11:35:05 +01:00
parent f9d1538186
commit d819a62db2
2 changed files with 4 additions and 3 deletions

View File

@@ -71,6 +71,10 @@ Pocket::Pocket()
ADD_PROPERTY_TYPE(Offset,(0.0),"Pocket",App::Prop_None,"Offset from face in which pocket will end");
static const App::PropertyQuantityConstraint::Constraints signedLengthConstraint = {-DBL_MAX, DBL_MAX, 1.0};
Offset.setConstraints ( &signedLengthConstraint );
// Remove the constraints and keep the type to allow to accept negative values
// https://forum.freecadweb.org/viewtopic.php?f=3&t=52075&p=448410#p447636
Length2.setConstraints(nullptr);
}
short Pocket::mustExecute() const

View File

@@ -104,9 +104,6 @@
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
</widget>
</item>
</layout>