EMotion FX: Saving Anim Graph with CTRL+S displays unsaved changes prompt when no changes were made (#5936)

Saving an anim graph did not adjust the dirty flag and thus the saved changes dialog kept showing anim graphs that already saved the latest changes.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
monroegm-disable-blank-issue-2
Benjamin Jillich 4 years ago committed by GitHub
parent 271004635c
commit abf3e69b97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -581,6 +581,11 @@ namespace EMStudio
animGraph->SetFileName(filename.c_str());
}
if (parameters.GetValueAsBool("updateDirtyFlag", this))
{
animGraph->SetDirtyFlag(false);
}
GetMainWindow()->GetFileManager()->SourceAssetChanged(filename);
// Add file in case it did not exist before (when saving it the first time).

@ -330,6 +330,10 @@ namespace EMotionFX
const QString animGraphFilename = GenerateTempAnimGraphFilename();
SaveCurrentAnimGraph(animGraphFilename);
// Pretend editing the anim graph
EMotionFX::AnimGraph* animGraph = m_animGraphPlugin->GetActiveAnimGraph();
animGraph->SetDirtyFlag(true);
// Prepare a watcher to press the ok button when the SaveDirtySettingsWindow appears.
ModalPopupHandler saveDirtyPopupHandler;

Loading…
Cancel
Save