Merge branch 'development' of https://github.com/o3de/o3de into sc-editor-asset-redux
This commit is contained in:
@@ -19,6 +19,7 @@ AZ_POP_DISABLE_WARNING
|
||||
#include <AzCore/Serialization/IdUtils.h>
|
||||
#include <AzCore/Asset/AssetManagerBus.h>
|
||||
#include <AzFramework/StringFunc/StringFunc.h>
|
||||
#include <AzQtComponents/Components/ToastNotification.h>
|
||||
#include <GraphCanvas/GraphCanvasBus.h>
|
||||
#include <GraphCanvas/Components/GridBus.h>
|
||||
#include <GraphCanvas/Components/Nodes/NodeBus.h>
|
||||
@@ -3329,7 +3330,7 @@ namespace ScriptCanvasEditor
|
||||
|
||||
void Graph::OnToastInteraction()
|
||||
{
|
||||
const GraphCanvas::ToastId* toastId = GraphCanvas::ToastNotificationBus::GetCurrentBusId();
|
||||
const AzToolsFramework::ToastId* toastId = AzToolsFramework::ToastNotificationBus::GetCurrentBusId();
|
||||
|
||||
if (toastId)
|
||||
{
|
||||
@@ -3354,7 +3355,7 @@ namespace ScriptCanvasEditor
|
||||
|
||||
void Graph::OnToastDismissed()
|
||||
{
|
||||
const GraphCanvas::ToastId* toastId = GraphCanvas::ToastNotificationBus::GetCurrentBusId();
|
||||
const AzToolsFramework::ToastId* toastId = AzToolsFramework::ToastNotificationBus::GetCurrentBusId();
|
||||
|
||||
if (toastId)
|
||||
{
|
||||
@@ -3377,25 +3378,21 @@ namespace ScriptCanvasEditor
|
||||
|
||||
void Graph::ReportError(const ScriptCanvas::Node& node, const AZStd::string& errorSource, const AZStd::string& errorMessage)
|
||||
{
|
||||
GraphCanvas::ToastConfiguration toastConfiguration(GraphCanvas::ToastType::Error, errorSource, errorMessage);
|
||||
|
||||
toastConfiguration.SetCloseOnClick(true);
|
||||
toastConfiguration.SetDuration(AZStd::chrono::milliseconds(5000));
|
||||
AzQtComponents::ToastConfiguration toastConfiguration(AzQtComponents::ToastType::Error, errorSource.c_str(), errorMessage.c_str());
|
||||
|
||||
GraphCanvas::ViewId viewId;
|
||||
GraphCanvas::SceneRequestBus::EventResult(viewId, GetGraphCanvasGraphId(), &GraphCanvas::SceneRequests::GetViewId);
|
||||
|
||||
GraphCanvas::ToastId toastId;
|
||||
|
||||
AzToolsFramework::ToastId toastId;
|
||||
GraphCanvas::ViewRequestBus::EventResult(toastId, viewId, &GraphCanvas::ViewRequests::ShowToastNotification, toastConfiguration);
|
||||
|
||||
GraphCanvas::ToastNotificationBus::MultiHandler::BusConnect(toastId);
|
||||
AzToolsFramework::ToastNotificationBus::MultiHandler::BusConnect(toastId);
|
||||
m_toastNodeIds[toastId] = node.GetEntityId();
|
||||
}
|
||||
|
||||
void Graph::UnregisterToast(const GraphCanvas::ToastId& toastId)
|
||||
void Graph::UnregisterToast(const AzToolsFramework::ToastId& toastId)
|
||||
{
|
||||
GraphCanvas::ToastNotificationBus::MultiHandler::BusDisconnect(toastId);
|
||||
AzToolsFramework::ToastNotificationBus::MultiHandler::BusDisconnect(toastId);
|
||||
m_toastNodeIds.erase(toastId);
|
||||
}
|
||||
|
||||
@@ -3427,10 +3424,7 @@ namespace ScriptCanvasEditor
|
||||
|
||||
m_updateStrings.clear();
|
||||
|
||||
GraphCanvas::ToastConfiguration toastConfiguration(GraphCanvas::ToastType::Information, "Nodes Updates", displayString);
|
||||
toastConfiguration.SetCloseOnClick(true);
|
||||
toastConfiguration.SetDuration(AZStd::chrono::milliseconds(5000));
|
||||
|
||||
AzQtComponents::ToastConfiguration toastConfiguration(AzQtComponents::ToastType::Information, "Nodes Updates", displayString.c_str());
|
||||
GraphCanvas::ViewRequestBus::Event(viewId, &GraphCanvas::ViewRequests::ShowToastNotification, toastConfiguration);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user