Removed slice based context menu options from the RPE when prefabs are enabled.
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
This commit is contained in:
+7
-5
@@ -1951,12 +1951,13 @@ namespace AzToolsFramework
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If prefabs are enabled, there will be no root slice so bail out here since we don't need
|
||||||
|
// to show any slice options in the menu
|
||||||
AZ::SliceComponent* rootSlice = nullptr;
|
AZ::SliceComponent* rootSlice = nullptr;
|
||||||
AzFramework::SliceEntityOwnershipServiceRequestBus::EventResult(rootSlice, contextId,
|
AzFramework::SliceEntityOwnershipServiceRequestBus::EventResult(rootSlice, contextId,
|
||||||
&AzFramework::SliceEntityOwnershipServiceRequestBus::Events::GetRootSlice);
|
&AzFramework::SliceEntityOwnershipServiceRequestBus::Events::GetRootSlice);
|
||||||
if (!rootSlice)
|
if (!rootSlice)
|
||||||
{
|
{
|
||||||
AZ_Error("PropertyEditor", false, "Entity context has no root slice");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2105,10 +2106,6 @@ namespace AzToolsFramework
|
|||||||
{
|
{
|
||||||
QMenu* revertMenu = nullptr;
|
QMenu* revertMenu = nullptr;
|
||||||
|
|
||||||
revertMenu = menu.addMenu(tr("Revert overrides"));
|
|
||||||
revertMenu->setToolTipsVisible(true);
|
|
||||||
revertMenu->setEnabled(false);
|
|
||||||
|
|
||||||
//check for changes on selected property
|
//check for changes on selected property
|
||||||
if (componentClassData)
|
if (componentClassData)
|
||||||
{
|
{
|
||||||
@@ -2128,6 +2125,11 @@ namespace AzToolsFramework
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only add the "Revert overrides" menu option if it belongs to a slice
|
||||||
|
revertMenu = menu.addMenu(tr("Revert overrides"));
|
||||||
|
revertMenu->setToolTipsVisible(true);
|
||||||
|
revertMenu->setEnabled(false);
|
||||||
|
|
||||||
if (fieldNode)
|
if (fieldNode)
|
||||||
{
|
{
|
||||||
bool hasChanges = fieldNode->HasChangesVersusComparison(false);
|
bool hasChanges = fieldNode->HasChangesVersusComparison(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user