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