summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Client/Code/Core
diff options
context:
space:
mode:
authorJanne Kangas <janne.kangas@qt.io>2019-06-12 15:55:46 +0300
committerJanne Kangas <janne.kangas@qt.io>2019-06-20 13:56:04 +0300
commitdc73379e93a412a8033a1bdfe2a7b270298f59c5 (patch)
treea7192525b546306c41e0ee0cff44c46782d60d32 /src/Authoring/Client/Code/Core
parent57e08e87f7869d035d4b9cc9d1afd867610b5e47 (diff)
When deleting a datainput, remove bindings without asking
Delete bindings when exiting the datainput dialog, even if the user added a new datainput with the same name. Make datainput deletion changes undoable after dialog has been accepted. Add informative text to pop-up at datainput delete. Change-Id: Ic04f408d0495174e01eeb1a34383b539a6fbcc04 Task-id: QT3DS-2819 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Client/Code/Core')
-rw-r--r--src/Authoring/Client/Code/Core/Core/Dispatch.cpp4
-rw-r--r--src/Authoring/Client/Code/Core/Core/Dispatch.h8
-rw-r--r--src/Authoring/Client/Code/Core/Core/DispatchListeners.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/Authoring/Client/Code/Core/Core/Dispatch.cpp b/src/Authoring/Client/Code/Core/Core/Dispatch.cpp
index 4a1e0905..7ddf2d8b 100644
--- a/src/Authoring/Client/Code/Core/Core/Dispatch.cpp
+++ b/src/Authoring/Client/Code/Core/Core/Dispatch.cpp
@@ -621,9 +621,9 @@ void CDispatch::FireOnRefreshResourceFail(const QString &inResourceName,
void CDispatch::FireOnUndefinedDatainputsFail(
const QMultiMap<QString, QPair<qt3dsdm::Qt3DSDMInstanceHandle,
- qt3dsdm::Qt3DSDMPropertyHandle>> *map)
+ qt3dsdm::Qt3DSDMPropertyHandle>> *map, bool askFromUser)
{
- m_FailListeners.FireEvent(&CFailListener::OnUndefinedDatainputsFail, map);
+ m_FailListeners.FireEvent(&CFailListener::OnUndefinedDatainputsFail, map, askFromUser);
}
void CDispatch::AddRendererListener(CRendererListener *inListener)
diff --git a/src/Authoring/Client/Code/Core/Core/Dispatch.h b/src/Authoring/Client/Code/Core/Core/Dispatch.h
index e727af7f..9d1c564a 100644
--- a/src/Authoring/Client/Code/Core/Core/Dispatch.h
+++ b/src/Authoring/Client/Code/Core/Core/Dispatch.h
@@ -194,10 +194,10 @@ public:
void FireOnErrorFail(const QString &inText);
void FireOnRefreshResourceFail(const QString &inResourceName,
const QString &inDescription);
- void FireOnUndefinedDatainputsFail(
- const QMultiMap<QString,
- QPair<qt3dsdm::Qt3DSDMInstanceHandle,
- qt3dsdm::Qt3DSDMPropertyHandle>> *map);
+ void FireOnUndefinedDatainputsFail(const QMultiMap<QString,
+ QPair<qt3dsdm::Qt3DSDMInstanceHandle,
+ qt3dsdm::Qt3DSDMPropertyHandle>> *map,
+ bool askFromUser);
void AddRendererListener(CRendererListener *inListener);
void RemoveRendererListener(CRendererListener *inListener);
diff --git a/src/Authoring/Client/Code/Core/Core/DispatchListeners.h b/src/Authoring/Client/Code/Core/Core/DispatchListeners.h
index 252464e3..075a0c91 100644
--- a/src/Authoring/Client/Code/Core/Core/DispatchListeners.h
+++ b/src/Authoring/Client/Code/Core/Core/DispatchListeners.h
@@ -277,7 +277,7 @@ public:
virtual void OnUndefinedDatainputsFail(
const QMultiMap<QString,
QPair<qt3dsdm::Qt3DSDMInstanceHandle,
- qt3dsdm::Qt3DSDMPropertyHandle>> *map) = 0;
+ qt3dsdm::Qt3DSDMPropertyHandle>> *map, bool askFromUser) = 0;
};
class IDataModelListener