Move Duplicate menu items and shortcuts out of the Prefab Wip flag
Make duplicate prefab workflows available by default in Prefab mode.
This commit is contained in:
+20
-31
@@ -2240,42 +2240,31 @@ namespace AzToolsFramework
|
||||
RegenerateManipulators();
|
||||
});
|
||||
|
||||
bool isPrefabSystemEnabled = false;
|
||||
AzFramework::ApplicationRequests::Bus::BroadcastResult(
|
||||
isPrefabSystemEnabled, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled);
|
||||
// duplicate selection
|
||||
AddAction(
|
||||
m_actions, { QKeySequence(Qt::CTRL + Qt::Key_D) },
|
||||
/*ID_EDIT_CLONE =*/33525, s_duplicateTitle, s_duplicateDesc,
|
||||
[]()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
|
||||
bool prefabWipFeaturesEnabled = false;
|
||||
AzFramework::ApplicationRequests::Bus::BroadcastResult(
|
||||
prefabWipFeaturesEnabled, &AzFramework::ApplicationRequests::ArePrefabWipFeaturesEnabled);
|
||||
|
||||
if (!isPrefabSystemEnabled || (isPrefabSystemEnabled && prefabWipFeaturesEnabled))
|
||||
{
|
||||
// duplicate selection
|
||||
AddAction(
|
||||
m_actions, { QKeySequence(Qt::CTRL + Qt::Key_D) },
|
||||
/*ID_EDIT_CLONE =*/33525, s_duplicateTitle, s_duplicateDesc,
|
||||
[]()
|
||||
// Clear Widget selection - Prevents issues caused by cloning entities while a property in the Reflected Property Editor
|
||||
// is being edited.
|
||||
if (QApplication::focusWidget())
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
QApplication::focusWidget()->clearFocus();
|
||||
}
|
||||
|
||||
// Clear Widget selection - Prevents issues caused by cloning entities while a property in the Reflected Property Editor
|
||||
// is being edited.
|
||||
if (QApplication::focusWidget())
|
||||
{
|
||||
QApplication::focusWidget()->clearFocus();
|
||||
}
|
||||
ScopedUndoBatch undoBatch(s_duplicateUndoRedoDesc);
|
||||
auto selectionCommand = AZStd::make_unique<SelectionCommand>(EntityIdList(), s_duplicateUndoRedoDesc);
|
||||
selectionCommand->SetParent(undoBatch.GetUndoBatch());
|
||||
selectionCommand.release();
|
||||
|
||||
ScopedUndoBatch undoBatch(s_duplicateUndoRedoDesc);
|
||||
auto selectionCommand = AZStd::make_unique<SelectionCommand>(EntityIdList(), s_duplicateUndoRedoDesc);
|
||||
selectionCommand->SetParent(undoBatch.GetUndoBatch());
|
||||
selectionCommand.release();
|
||||
bool handled = false;
|
||||
EditorRequestBus::Broadcast(&EditorRequests::CloneSelection, handled);
|
||||
|
||||
bool handled = false;
|
||||
EditorRequestBus::Broadcast(&EditorRequests::CloneSelection, handled);
|
||||
|
||||
// selection update handled in AfterEntitySelectionChanged
|
||||
});
|
||||
}
|
||||
// selection update handled in AfterEntitySelectionChanged
|
||||
});
|
||||
|
||||
// delete selection
|
||||
AddAction(
|
||||
|
||||
Reference in New Issue
Block a user