Remove the Level Inspector from Prefab mode and move behavior to Entity Inspector. (#149)
* Remove Level Inspector from Prefab mode, and integrate the same behavior in the Entity Inspector * Show prefab name in level entity row of the Outliner. Allow Ui Handlers to prevent renaming. * Separate setting the prefab's template path and the container entity name. * Disable reparenting to root level * Disable the ability to rename the level entity. * Fixes as per Ram's review
This commit is contained in:
@@ -36,6 +36,8 @@
|
||||
#include <algorithm>
|
||||
#include <QScopedValueRollback>
|
||||
|
||||
#include <AzFramework/API/ApplicationAPI.h>
|
||||
|
||||
#include <AzAssetBrowser/AzAssetBrowserWindow.h>
|
||||
#include <AzToolsFramework/UI/UICore/WidgetHelpers.h>
|
||||
#include <AzQtComponents/Utilities/AutoSettingsGroup.h>
|
||||
@@ -983,6 +985,11 @@ bool QtViewPaneManager::ClosePanesWithRollback(const QVector<QString>& panesToKe
|
||||
*/
|
||||
void QtViewPaneManager::RestoreDefaultLayout(bool resetSettings)
|
||||
{
|
||||
// Get whether the prefab system is enabled
|
||||
bool isPrefabSystemEnabled = false;
|
||||
AzFramework::ApplicationRequests::Bus::BroadcastResult(
|
||||
isPrefabSystemEnabled, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled);
|
||||
|
||||
if (resetSettings)
|
||||
{
|
||||
// We're going to do something destructive (removing all of the viewpane settings). Better confirm with the user
|
||||
@@ -1022,7 +1029,11 @@ void QtViewPaneManager::RestoreDefaultLayout(bool resetSettings)
|
||||
state.viewPanes.push_back(LyViewPane::EntityInspector);
|
||||
state.viewPanes.push_back(LyViewPane::AssetBrowser);
|
||||
state.viewPanes.push_back(LyViewPane::Console);
|
||||
state.viewPanes.push_back(LyViewPane::LevelInspector);
|
||||
|
||||
if (!isPrefabSystemEnabled)
|
||||
{
|
||||
state.viewPanes.push_back(LyViewPane::LevelInspector);
|
||||
}
|
||||
|
||||
state.mainWindowState = m_defaultMainWindowState;
|
||||
|
||||
@@ -1047,7 +1058,12 @@ void QtViewPaneManager::RestoreDefaultLayout(bool resetSettings)
|
||||
const QtViewPane* assetBrowserViewPane = OpenPane(LyViewPane::AssetBrowser, QtViewPane::OpenMode::UseDefaultState);
|
||||
const QtViewPane* entityInspectorViewPane = OpenPane(LyViewPane::EntityInspector, QtViewPane::OpenMode::UseDefaultState);
|
||||
const QtViewPane* consoleViewPane = OpenPane(LyViewPane::Console, QtViewPane::OpenMode::UseDefaultState);
|
||||
const QtViewPane* levelInspectorPane = OpenPane(LyViewPane::LevelInspector, QtViewPane::OpenMode::UseDefaultState);
|
||||
|
||||
const QtViewPane* levelInspectorPane = nullptr;
|
||||
if (!isPrefabSystemEnabled)
|
||||
{
|
||||
levelInspectorPane = OpenPane(LyViewPane::LevelInspector, QtViewPane::OpenMode::UseDefaultState);
|
||||
}
|
||||
|
||||
// This class does all kinds of behind the scenes magic to make docking / restore work, especially with groups
|
||||
// so instead of doing our special default layout attach / docking right now, we want to make it happen
|
||||
|
||||
Reference in New Issue
Block a user