Fix cloth settings

master
Jeremy Hu 2020-01-14 08:15:42 +09:30
parent 5a59abdca4
commit d71fe65f22
1 changed files with 10 additions and 0 deletions

View File

@ -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);