summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Client/Code/Core/Doc/Doc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Authoring/Client/Code/Core/Doc/Doc.cpp')
-rw-r--r--src/Authoring/Client/Code/Core/Doc/Doc.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/Doc.cpp b/src/Authoring/Client/Code/Core/Doc/Doc.cpp
index b632513d..3457d50a 100644
--- a/src/Authoring/Client/Code/Core/Doc/Doc.cpp
+++ b/src/Authoring/Client/Code/Core/Doc/Doc.cpp
@@ -1275,7 +1275,11 @@ void CDoc::onPropertyChanged(qt3dsdm::Qt3DSDMInstanceHandle inInstance,
qt3dsdm::Qt3DSDMPropertyHandle inProperty)
{
using namespace qt3dsdm;
-
+ // Save the material definition upon undo and redo
+ if (m_Core->GetCmdStack()->isUndoingOrRedoing() &&
+ m_StudioSystem->GetClientDataModelBridge()->isInsideMaterialContainer(inInstance)) {
+ getSceneEditor()->saveIfMaterial(inInstance);
+ }
// check if we changed datainput bindings
if (inProperty == m_StudioSystem->GetPropertySystem()
->GetAggregateInstancePropertyByName(inInstance, L"controlledproperty")) {