Fix undo/redo on color picking

master
Jeremy Hu 2018-08-31 20:19:56 +08:00
parent df9c8e8e3c
commit 1bac6c4c53
1 changed files with 5 additions and 0 deletions

View File

@ -142,6 +142,7 @@ SkeletonPartWidget::SkeletonPartWidget(const SkeletonDocument *document, QUuid p
return; return;
} }
emit setPartLockState(m_partId, !part->locked); emit setPartLockState(m_partId, !part->locked);
emit groupOperationAdded();
}); });
connect(m_visibleButton, &QPushButton::clicked, [=]() { connect(m_visibleButton, &QPushButton::clicked, [=]() {
@ -151,6 +152,7 @@ SkeletonPartWidget::SkeletonPartWidget(const SkeletonDocument *document, QUuid p
return; return;
} }
emit setPartVisibleState(m_partId, !part->visible); emit setPartVisibleState(m_partId, !part->visible);
emit groupOperationAdded();
}); });
connect(m_subdivButton, &QPushButton::clicked, [=]() { connect(m_subdivButton, &QPushButton::clicked, [=]() {
@ -305,6 +307,7 @@ void SkeletonPartWidget::showColorSettingPopup(const QPoint &pos)
connect(colorEraser, &QPushButton::clicked, [=]() { connect(colorEraser, &QPushButton::clicked, [=]() {
emit setPartColorState(m_partId, false, Theme::white); emit setPartColorState(m_partId, false, Theme::white);
emit groupOperationAdded();
}); });
connect(pickButton, &QPushButton::clicked, [=]() { connect(pickButton, &QPushButton::clicked, [=]() {
@ -313,6 +316,7 @@ void SkeletonPartWidget::showColorSettingPopup(const QPoint &pos)
emit enableBackgroundBlur(); emit enableBackgroundBlur();
if(color.isValid()) { if(color.isValid()) {
emit setPartColorState(m_partId, true, color); emit setPartColorState(m_partId, true, color);
emit groupOperationAdded();
} }
}); });
@ -352,6 +356,7 @@ void SkeletonPartWidget::showDeformSettingPopup(const QPoint &pos)
connect(widthWidget, &FloatNumberWidget::valueChanged, [=](float value) { connect(widthWidget, &FloatNumberWidget::valueChanged, [=](float value) {
emit setPartDeformWidth(m_partId, value); emit setPartDeformWidth(m_partId, value);
emit groupOperationAdded();
}); });
QPushButton *thicknessEraser = new QPushButton(QChar(fa::eraser)); QPushButton *thicknessEraser = new QPushButton(QChar(fa::eraser));