restore source file deleted behavior
Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
@@ -662,7 +662,7 @@ namespace ScriptCanvasEditor
|
||||
ScriptCanvas::BatchOperationNotificationBus::Handler::BusConnect();
|
||||
AssetGraphSceneBus::Handler::BusConnect();
|
||||
AzToolsFramework::ToolsApplicationNotificationBus::Handler::BusConnect();
|
||||
|
||||
AzToolsFramework::AssetSystemBus::Handler::BusConnect();
|
||||
ScriptCanvas::ScriptCanvasSettingsRequestBus::Handler::BusConnect();
|
||||
|
||||
UINotificationBus::Broadcast(&UINotifications::MainWindowCreationEvent, this);
|
||||
@@ -706,6 +706,7 @@ namespace ScriptCanvasEditor
|
||||
ScriptCanvasEditor::GeneralRequestBus::Handler::BusDisconnect();
|
||||
GraphCanvas::AssetEditorAutomationRequestBus::Handler::BusDisconnect();
|
||||
ScriptCanvas::ScriptCanvasSettingsRequestBus::Handler::BusDisconnect();
|
||||
AzToolsFramework::AssetSystemBus::Handler::BusDisconnect();
|
||||
|
||||
Clear();
|
||||
|
||||
@@ -1109,6 +1110,15 @@ namespace ScriptCanvasEditor
|
||||
RestartAutoTimerSave(forceTimer);
|
||||
}
|
||||
|
||||
void MainWindow::SourceFileRemoved
|
||||
( AZStd::string relativePath
|
||||
, [[maybe_unused]] AZStd::string scanFolder
|
||||
, [[maybe_unused]] AZ::Uuid fileAssetId)
|
||||
{
|
||||
ScriptCanvasEditor::SourceHandle handle(nullptr, fileAssetId, relativePath);
|
||||
UpdateFileState(handle, Tracker::ScriptCanvasFileState::SOURCE_REMOVED);
|
||||
}
|
||||
|
||||
void MainWindow::SignalSceneDirty(ScriptCanvasEditor::SourceHandle assetId)
|
||||
{
|
||||
UpdateFileState(assetId, Tracker::ScriptCanvasFileState::MODIFIED);
|
||||
@@ -2533,7 +2543,6 @@ namespace ScriptCanvasEditor
|
||||
|
||||
bool MainWindow::IsInUndoRedo(const AZ::EntityId& graphCanvasGraphId) const
|
||||
{
|
||||
// #sc_editor_asset
|
||||
bool isActive = false;
|
||||
UndoRequestBus::EventResult(isActive, GetScriptCanvasId(graphCanvasGraphId), &UndoRequests::IsActive);
|
||||
return isActive;
|
||||
@@ -2588,12 +2597,10 @@ namespace ScriptCanvasEditor
|
||||
|
||||
void MainWindow::ReconnectSceneBuses(ScriptCanvasEditor::SourceHandle previousAsset, ScriptCanvasEditor::SourceHandle nextAsset)
|
||||
{
|
||||
// #sc_editor_asset
|
||||
|
||||
// Disconnect previous asset
|
||||
AZ::EntityId previousScriptCanvasSceneId;
|
||||
if (previousAsset.IsValid())
|
||||
{
|
||||
{
|
||||
previousScriptCanvasSceneId = previousAsset.Get()->GetScriptCanvasId();
|
||||
GraphCanvas::SceneNotificationBus::MultiHandler::BusDisconnect(previousScriptCanvasSceneId);
|
||||
}
|
||||
|
||||
@@ -231,7 +231,6 @@ namespace ScriptCanvasEditor
|
||||
, private VariablePaletteRequestBus::Handler
|
||||
, private ScriptCanvas::BatchOperationNotificationBus::Handler
|
||||
, private AssetGraphSceneBus::Handler
|
||||
//, private AssetTrackerNotificationBus::MultiHandler
|
||||
#if SCRIPTCANVAS_EDITOR
|
||||
//, public IEditorNotifyListener
|
||||
#endif
|
||||
@@ -240,6 +239,7 @@ namespace ScriptCanvasEditor
|
||||
, private GraphCanvas::ViewNotificationBus::Handler
|
||||
, public AZ::SystemTickBus::Handler
|
||||
, private AzToolsFramework::ToolsApplicationNotificationBus::Handler
|
||||
, private AzToolsFramework::AssetSystemBus::Handler
|
||||
, private ScriptCanvas::ScriptCanvasSettingsRequestBus::Handler
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -525,6 +525,8 @@ namespace ScriptCanvasEditor
|
||||
AZ::EntityId FindAssetNodeIdByEditorNodeId(const ScriptCanvasEditor::SourceHandle& assetId, AZ::EntityId editorNodeId) const override;
|
||||
|
||||
private:
|
||||
void SourceFileRemoved(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid fileAssetId) override;
|
||||
|
||||
void DeleteNodes(const AZ::EntityId& sceneId, const AZStd::vector<AZ::EntityId>& nodes) override;
|
||||
void DeleteConnections(const AZ::EntityId& sceneId, const AZStd::vector<AZ::EntityId>& connections) override;
|
||||
void DisconnectEndpoints(const AZ::EntityId& sceneId, const AZStd::vector<GraphCanvas::Endpoint>& endpoints) override;
|
||||
|
||||
Reference in New Issue
Block a user