Fix rig result doesn't reset after document changed
parent
34e2ac1fef
commit
09200c920d
|
@ -25,7 +25,7 @@ MotionManageWidget::MotionManageWidget(const SkeletonDocument *document, QWidget
|
|||
infoLabel->setText(tr("Missing Rig"));
|
||||
infoLabel->show();
|
||||
|
||||
connect(m_document, &SkeletonDocument::resultRigChanged, this, [=]() {
|
||||
auto refreshInfoLabel = [=]() {
|
||||
if (m_document->currentRigSucceed()) {
|
||||
infoLabel->hide();
|
||||
addMotionButton->show();
|
||||
|
@ -33,7 +33,10 @@ MotionManageWidget::MotionManageWidget(const SkeletonDocument *document, QWidget
|
|||
infoLabel->show();
|
||||
addMotionButton->hide();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
connect(m_document, &SkeletonDocument::resultRigChanged, this, refreshInfoLabel);
|
||||
connect(m_document, &SkeletonDocument::cleanup, this, refreshInfoLabel);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout;
|
||||
mainLayout->addWidget(infoLabel);
|
||||
|
|
|
@ -25,7 +25,7 @@ PoseManageWidget::PoseManageWidget(const SkeletonDocument *document, QWidget *pa
|
|||
infoLabel->setText(tr("Missing Rig"));
|
||||
infoLabel->show();
|
||||
|
||||
connect(m_document, &SkeletonDocument::resultRigChanged, this, [=]() {
|
||||
auto refreshInfoLabel = [=]() {
|
||||
if (m_document->currentRigSucceed()) {
|
||||
infoLabel->hide();
|
||||
addPoseButton->show();
|
||||
|
@ -33,7 +33,10 @@ PoseManageWidget::PoseManageWidget(const SkeletonDocument *document, QWidget *pa
|
|||
infoLabel->show();
|
||||
addPoseButton->hide();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
connect(m_document, &SkeletonDocument::resultRigChanged, this, refreshInfoLabel);
|
||||
connect(m_document, &SkeletonDocument::cleanup, this, refreshInfoLabel);
|
||||
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout;
|
||||
mainLayout->addWidget(infoLabel);
|
||||
|
|
|
@ -1375,6 +1375,7 @@ void SkeletonDocument::reset()
|
|||
motionMap.clear();
|
||||
motionIdList.clear();
|
||||
rootComponent = SkeletonComponent();
|
||||
removeRigResults();
|
||||
emit cleanup();
|
||||
emit skeletonChanged();
|
||||
}
|
||||
|
@ -2742,6 +2743,8 @@ void SkeletonDocument::removeRigResults()
|
|||
m_resultRigErrorMarkNames.clear();
|
||||
m_resultRigMissingMarkNames.clear();
|
||||
|
||||
m_currentRigSucceed = false;
|
||||
|
||||
emit resultRigChanged();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue