From d71fe65f22498d7136f548443a4afa8cb09902e1 Mon Sep 17 00:00:00 2001 From: Jeremy Hu Date: Tue, 14 Jan 2020 08:15:42 +0930 Subject: [PATCH] Fix cloth settings --- src/parttreewidget.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/parttreewidget.cpp b/src/parttreewidget.cpp index 8de2d9b8..8578cb35 100644 --- a/src/parttreewidget.cpp +++ b/src/parttreewidget.cpp @@ -284,6 +284,11 @@ void PartTreeWidget::showClothSettingMenu(const QPoint &pos, const QUuid &compon QPushButton *clothStiffnessEraser = new QPushButton(QChar(fa::eraser)); Theme::initAwesomeToolButton(clothStiffnessEraser); + connect(clothStiffnessEraser, &QPushButton::clicked, [=]() { + clothStiffnessWidget->setValue(Component::defaultStiffness); + emit groupOperationAdded(); + }); + QHBoxLayout *clothStiffnessLayout = new QHBoxLayout; clothStiffnessLayout->addWidget(clothStiffnessEraser); clothStiffnessLayout->addWidget(clothStiffnessWidget); @@ -301,6 +306,11 @@ void PartTreeWidget::showClothSettingMenu(const QPoint &pos, const QUuid &compon QPushButton *clothOffsetEraser = new QPushButton(QChar(fa::eraser)); Theme::initAwesomeToolButton(clothOffsetEraser); + connect(clothOffsetEraser, &QPushButton::clicked, [=]() { + clothOffsetWidget->setValue(0.0); + emit groupOperationAdded(); + }); + QHBoxLayout *clothOffsetLayout = new QHBoxLayout; clothOffsetLayout->addWidget(clothOffsetEraser); clothOffsetLayout->addWidget(clothOffsetWidget);