PartDesign: fix draggers for chamfer with two dimensions

This commit is contained in:
captain0xff
2025-09-01 23:20:18 +05:30
parent a353ef9307
commit 37100c6179
2 changed files with 8 additions and 9 deletions

View File

@@ -178,9 +178,8 @@ SoLinearDraggerContainer* LinearGizmo::getDraggerContainer()
void LinearGizmo::setProperty(QuantitySpinBox* property)
{
if (quantityChangedConnection) {
QuantitySpinBox::disconnect(quantityChangedConnection);
}
QuantitySpinBox::disconnect(quantityChangedConnection);
QuantitySpinBox::disconnect(formulaDialogConnection);
this->property = property;
quantityChangedConnection = QuantitySpinBox::connect(
@@ -189,7 +188,7 @@ void LinearGizmo::setProperty(QuantitySpinBox* property)
setDragLength(value);
}
);
quantityChangedConnection = QuantitySpinBox::connect(
formulaDialogConnection = QuantitySpinBox::connect(
property, &Gui::QuantitySpinBox::showFormulaDialog,
[this] (bool) {
// This will set the visibility of the actual geometry to true or false
@@ -452,9 +451,8 @@ void RotationGizmo::orientAlongCamera(SoCamera* camera)
void RotationGizmo::setProperty(QuantitySpinBox* property)
{
if (quantityChangedConnection) {
QuantitySpinBox::disconnect(quantityChangedConnection);
}
QuantitySpinBox::disconnect(quantityChangedConnection);
QuantitySpinBox::disconnect(formulaDialogConnection);
this->property = property;
quantityChangedConnection = QuantitySpinBox::connect(
@@ -463,7 +461,7 @@ void RotationGizmo::setProperty(QuantitySpinBox* property)
setRotAngle(value);
}
);
quantityChangedConnection = QuantitySpinBox::connect(
formulaDialogConnection = QuantitySpinBox::connect(
property, &Gui::QuantitySpinBox::showFormulaDialog,
[this] (bool) {
// This will set the visibility of the actual geometry to true or false

View File

@@ -85,7 +85,6 @@ protected:
double initialValue;
bool visible = true;
bool hasExpression = false;
};
class GuiExport LinearGizmo: public Gizmo
@@ -115,6 +114,7 @@ private:
SoLinearDragger* dragger = nullptr;
SoLinearDraggerContainer* draggerContainer = nullptr;
QMetaObject::Connection quantityChangedConnection;
QMetaObject::Connection formulaDialogConnection;
void draggingStarted();
void draggingFinished();
@@ -160,6 +160,7 @@ private:
LinearGizmo* linearGizmo = nullptr;
bool automaticOrientation = false;
QMetaObject::Connection quantityChangedConnection;
QMetaObject::Connection formulaDialogConnection;
void draggingStarted();
void draggingFinished();