Integrating up through commit 90f050496
This commit is contained in:
@@ -191,6 +191,8 @@ void LevelEditorMenuHandler::Initialize()
|
||||
m_viewPaneManager, &QtViewPaneManager::registeredPanesChanged,
|
||||
this, &LevelEditorMenuHandler::ResetToolsMenus);
|
||||
|
||||
m_levelExtension = EditorUtils::LevelFile::GetDefaultFileExtension();
|
||||
|
||||
m_topLevelMenus << CreateFileMenu();
|
||||
|
||||
auto editMenu = CreateEditMenu();
|
||||
@@ -230,6 +232,11 @@ bool LevelEditorMenuHandler::MRUEntryIsValid(const QString& entry, const QString
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!entry.endsWith(m_levelExtension))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const QDir gameDir(gameFolderPath);
|
||||
QDir dir(entry); // actually pointing at file, first cdUp() gets us the parent dir
|
||||
while (dir.cdUp())
|
||||
@@ -473,8 +480,18 @@ void LevelEditorMenuHandler::PopulateEditMenu(ActionManager::MenuWrapper& editMe
|
||||
// editMenu->addAction(ID_EDIT_PASTE);
|
||||
// editMenu.AddSeparator();
|
||||
|
||||
// Duplicate
|
||||
editMenu.AddAction(ID_EDIT_CLONE);
|
||||
bool isPrefabSystemEnabled = false;
|
||||
AzFramework::ApplicationRequests::Bus::BroadcastResult(isPrefabSystemEnabled, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled);
|
||||
|
||||
bool prefabWipFeaturesEnabled = false;
|
||||
AzFramework::ApplicationRequests::Bus::BroadcastResult(
|
||||
prefabWipFeaturesEnabled, &AzFramework::ApplicationRequests::ArePrefabWipFeaturesEnabled);
|
||||
|
||||
if (!isPrefabSystemEnabled || (isPrefabSystemEnabled && prefabWipFeaturesEnabled))
|
||||
{
|
||||
// Duplicate
|
||||
editMenu.AddAction(ID_EDIT_CLONE);
|
||||
}
|
||||
|
||||
// Delete
|
||||
editMenu.AddAction(ID_EDIT_DELETE);
|
||||
@@ -701,8 +718,15 @@ QMenu* LevelEditorMenuHandler::CreateGameMenu()
|
||||
gameMenu.AddAction(ID_SWITCH_PHYSICS);
|
||||
gameMenu.AddSeparator();
|
||||
|
||||
// Export to Engine
|
||||
gameMenu.AddAction(ID_FILE_EXPORTTOGAMENOSURFACETEXTURE);
|
||||
|
||||
bool usePrefabSystemForLevels = false;
|
||||
AzFramework::ApplicationRequests::Bus::BroadcastResult(
|
||||
usePrefabSystemForLevels, &AzFramework::ApplicationRequests::IsPrefabSystemForLevelsEnabled);
|
||||
if (!usePrefabSystemForLevels)
|
||||
{
|
||||
// Export to Engine
|
||||
gameMenu.AddAction(ID_FILE_EXPORTTOGAMENOSURFACETEXTURE);
|
||||
}
|
||||
|
||||
// Export Selected Objects
|
||||
gameMenu.AddAction(ID_FILE_EXPORT_SELECTEDOBJECTS);
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
|
||||
void Initialize();
|
||||
|
||||
static bool MRUEntryIsValid(const QString& entry, const QString& gameFolderPath);
|
||||
bool MRUEntryIsValid(const QString& entry, const QString& gameFolderPath);
|
||||
|
||||
void IncrementViewPaneVersion();
|
||||
int GetViewPaneVersion() const;
|
||||
@@ -119,6 +119,7 @@ private:
|
||||
ActionManager::MenuWrapper m_layoutsMenu;
|
||||
ActionManager::MenuWrapper m_macrosMenu;
|
||||
|
||||
const char* m_levelExtension = nullptr;
|
||||
int m_viewPaneVersion = 0;
|
||||
|
||||
QList<QMenu*> m_topLevelMenus;
|
||||
|
||||
Reference in New Issue
Block a user