Fix motion regeneration

Fix motion not regenerating when related pose changed.
master
Jeremy Hu 2020-02-29 20:56:08 +09:30
parent f36655bf42
commit 14cbb72253
1 changed files with 13 additions and 0 deletions

View File

@ -527,9 +527,22 @@ void Document::setPoseFrames(QUuid poseId, std::vector<std::pair<std::map<QStrin
} }
findPoseResult->second.frames = frames; findPoseResult->second.frames = frames;
findPoseResult->second.dirty = true; findPoseResult->second.dirty = true;
bool foundMotion = false;
for (auto &it: motionMap) {
for (const auto &clip: it.second.clips) {
if (poseId == clip.linkToId) {
it.second.dirty = true;
foundMotion = true;
break;
}
}
}
emit posesChanged(); emit posesChanged();
emit poseFramesChanged(poseId); emit poseFramesChanged(poseId);
emit optionsChanged(); emit optionsChanged();
if (foundMotion) {
emit motionsChanged();
}
} }
void Document::setPoseTurnaroundImageId(QUuid poseId, QUuid imageId) void Document::setPoseTurnaroundImageId(QUuid poseId, QUuid imageId)