Removed unused Qt classes and do some more code clean up
Signed-off-by: srikappa-amzn <srikappa@amazon.com>
This commit is contained in:
+1
-14
@@ -33,9 +33,7 @@ AZ_POP_DISABLE_WARNING
|
||||
#include <QScopedValueRollback>
|
||||
#include <QClipboard>
|
||||
#include <QMenuBar>
|
||||
#include <QCheckBox>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QPixmap>
|
||||
|
||||
// Aws Native SDK
|
||||
#include <aws/sts/STSClient.h>
|
||||
@@ -71,12 +69,10 @@ AZ_POP_DISABLE_WARNING
|
||||
#include <AzToolsFramework/API/EditorPythonRunnerRequestsBus.h>
|
||||
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
|
||||
#include <AzToolsFramework/Entity/PrefabEditorEntityOwnershipInterface.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabSystemComponentInterface.h>
|
||||
#include <AzToolsFramework/PythonTerminal/ScriptHelpDialog.h>
|
||||
|
||||
// AzQtComponents
|
||||
#include <AzQtComponents/Components/StyleManager.h>
|
||||
#include <AzQtComponents/Components/Widgets/CheckBox.h>
|
||||
#include <AzQtComponents/Utilities/HandleDpiAwareness.h>
|
||||
#include <AzQtComponents/Components/WindowDecorationWrapper.h>
|
||||
#include <AzQtComponents/Utilities/QtPluginPaths.h>
|
||||
@@ -742,12 +738,10 @@ void CCryEditApp::OnFileSave()
|
||||
}
|
||||
else
|
||||
{
|
||||
//auto prefabSystemComponentInterface = AZ::Interface<AzToolsFramework::Prefab::PrefabSystemComponentInterface>::Get();
|
||||
auto prefabEditorEntityOwnershipService = AZ::Interface<AzToolsFramework::PrefabEditorEntityOwnershipInterface>::Get();
|
||||
AzToolsFramework::Prefab::TemplateId rootPrefabTemplateId = prefabEditorEntityOwnershipService->GetRootPrefabTemplateId();
|
||||
auto prefabIntegrationInterface = AZ::Interface<AzToolsFramework::Prefab::PrefabIntegrationInterface>::Get();
|
||||
prefabIntegrationInterface->ExecuteSavePrefabsDialog(rootPrefabTemplateId, true);
|
||||
// prefabSystemComponentInterface->AreDirtyTemplatesPresent(rootPrefabTemplateId)
|
||||
prefabIntegrationInterface->ExecuteSavePrefabDialog(rootPrefabTemplateId, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3204,13 +3198,6 @@ bool CCryEditApp::CreateLevel(bool& wasCreateLevelOperationCancelled)
|
||||
switch (1 - prefabSaveSelection)
|
||||
{
|
||||
case QDialogButtonBox::AcceptRole:
|
||||
if (!GetIEditor()->GetDocument()->DoFileSave())
|
||||
{
|
||||
// if the file save operation failed, assume that the user was informed of why
|
||||
// already and treat it as a cancel
|
||||
wasCreateLevelOperationCancelled = true;
|
||||
return false;
|
||||
}
|
||||
bIsDocModified = false;
|
||||
break;
|
||||
case QDialogButtonBox::RejectRole:
|
||||
|
||||
@@ -13,16 +13,7 @@
|
||||
|
||||
// Qt
|
||||
#include <QDateTime>
|
||||
#include <QCheckBox>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QGroupBox>
|
||||
#include <QListWidget>
|
||||
#include <QScrollArea>
|
||||
#include <QSizePolicy>
|
||||
#include <AzQtComponents/Components/FlowLayout.h>
|
||||
#include <AzQtComponents/Components/StyleManager.h>
|
||||
#include <AzQtComponents/Components/Widgets/CheckBox.h>
|
||||
#include <AzQtComponents/Components/Widgets/CardHeader.h>
|
||||
|
||||
// AzCore
|
||||
#include <AzCore/Component/TransformBus.h>
|
||||
|
||||
@@ -97,7 +97,7 @@ void CEditorPreferencesPage_General::Reflect(AZ::SerializeContext& serialize)
|
||||
->DataElement(AZ::Edit::UIHandlers::CheckBox, &GeneralSettings::m_restoreViewportCamera, EditorPreferencesGeneralRestoreViewportCameraSettingName, "Keep the original editor viewport transform when exiting game mode.")
|
||||
->DataElement(AZ::Edit::UIHandlers::CheckBox, &GeneralSettings::m_enableSceneInspector, "Enable Scene Inspector (EXPERIMENTAL)", "Enable the option to inspect the internal data loaded from scene files like .fbx. This is an experimental feature. Restart the Scene Settings if the option is not visible under the Help menu.");
|
||||
|
||||
editContext->Class<GlobalSaveSettings>("Global Save Settings (File > Save & Ctrl+S)", "")
|
||||
editContext->Class<GlobalSaveSettings>("Global Save Settings (File>Save & Ctrl+S)", "")
|
||||
->DataElement(
|
||||
AZ::Edit::UIHandlers::ComboBox, &GlobalSaveSettings::m_saveAllPrefabsPreference, "Save Prefabs Preference",
|
||||
"This option controls whether prefabs should be saved along with the level")
|
||||
|
||||
@@ -245,11 +245,6 @@ QTableWidget#recentLevelTable::item {
|
||||
qproperty-iconSize: 16px 16px;
|
||||
}
|
||||
|
||||
QListWidget::item
|
||||
{
|
||||
border : none;
|
||||
}
|
||||
|
||||
#SavePrefabDialog, #SaveAllFilesDialog
|
||||
{
|
||||
min-width : 640px;
|
||||
|
||||
-1
@@ -56,6 +56,5 @@ namespace AzToolsFramework
|
||||
virtual void StopPlayInEditor() = 0;
|
||||
|
||||
virtual void CreateNewLevelPrefab(AZStd::string_view filename, const AZStd::string& templateFilename) = 0;
|
||||
virtual bool IsRootTemplateDirty() = 0;
|
||||
};
|
||||
}
|
||||
|
||||
-5
@@ -617,11 +617,6 @@ namespace AzToolsFramework
|
||||
m_playInEditorData.m_isEnabled = false;
|
||||
}
|
||||
|
||||
bool PrefabEditorEntityOwnershipService::IsRootTemplateDirty()
|
||||
{
|
||||
return (m_prefabSystemComponent->IsTemplateDirty(m_rootInstance->GetTemplateId()));
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Slice Buses implementation with Assert(false), this will exist only during Slice->Prefab
|
||||
// development to pinpoint and replace specific calls to Slice system
|
||||
|
||||
-1
@@ -196,7 +196,6 @@ namespace AzToolsFramework
|
||||
Prefab::TemplateId GetRootPrefabTemplateId() override;
|
||||
|
||||
const AZStd::vector<AZ::Data::Asset<AZ::Data::AssetData>>& GetPlayInEditorAssetData() override;
|
||||
bool IsRootTemplateDirty() override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void OnEntityRemoved(AZ::EntityId entityId);
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace AzToolsFramework
|
||||
{
|
||||
namespace Prefab
|
||||
{
|
||||
static constexpr const char s_savePrefabsKey[] = "/O3DE/Preferences/SavePrefabs";
|
||||
static constexpr const char s_saveAllPrefabsKey[] = "/O3DE/Preferences/SaveAllPrefabs";
|
||||
|
||||
void PrefabLoader::Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
@@ -674,7 +674,7 @@ namespace AzToolsFramework
|
||||
SaveAllPrefabsPreference saveAllPrefabsPreference = SaveAllPrefabsPreference::AskEveryTime;
|
||||
if (auto* registry = AZ::SettingsRegistry::Get())
|
||||
{
|
||||
registry->GetObject(saveAllPrefabsPreference, s_savePrefabsKey);
|
||||
registry->GetObject(saveAllPrefabsPreference, s_saveAllPrefabsKey);
|
||||
}
|
||||
return saveAllPrefabsPreference;
|
||||
}
|
||||
@@ -683,7 +683,7 @@ namespace AzToolsFramework
|
||||
{
|
||||
if (auto* registry = AZ::SettingsRegistry::Get())
|
||||
{
|
||||
registry->SetObject(s_savePrefabsKey, saveAllPrefabsPreference);
|
||||
registry->SetObject(s_saveAllPrefabsKey, saveAllPrefabsPreference);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ namespace AzToolsFramework
|
||||
virtual AZ::EntityId CreateNewEntityAtPosition(const AZ::Vector3& position, AZ::EntityId parentId) = 0;
|
||||
|
||||
virtual int ExecuteClosePrefabDialog(TemplateId templateId) = 0;
|
||||
virtual void ExecuteSavePrefabsDialog(TemplateId templateId, bool useSaveAllPrefabsPreference = false) = 0;
|
||||
virtual void ExecuteSavePrefabDialog(TemplateId templateId, bool useSaveAllPrefabsPreference = false) = 0;
|
||||
};
|
||||
|
||||
} // namespace Prefab
|
||||
|
||||
+6
-6
@@ -1089,7 +1089,7 @@ namespace AzToolsFramework
|
||||
return prefabSaveSelection;
|
||||
}
|
||||
|
||||
void PrefabIntegrationManager::ExecuteSavePrefabsDialog(TemplateId templateId, bool useSaveAllPrefabsPreference)
|
||||
void PrefabIntegrationManager::ExecuteSavePrefabDialog(TemplateId templateId, bool useSaveAllPrefabsPreference)
|
||||
{
|
||||
using namespace AzToolsFramework::Prefab;
|
||||
|
||||
@@ -1120,14 +1120,14 @@ namespace AzToolsFramework
|
||||
}
|
||||
}
|
||||
|
||||
AZStd::unique_ptr<QDialog> savePrefabsDialog = ConstructSavePrefabsDialog(templateId, useSaveAllPrefabsPreference);
|
||||
if (savePrefabsDialog)
|
||||
AZStd::unique_ptr<QDialog> savePrefabDialog = ConstructSavePrefabDialog(templateId, useSaveAllPrefabsPreference);
|
||||
if (savePrefabDialog)
|
||||
{
|
||||
int prefabSaveSelection = savePrefabsDialog->exec();
|
||||
int prefabSaveSelection = savePrefabDialog->exec();
|
||||
|
||||
if (prefabSaveSelection == QDialog::Accepted)
|
||||
{
|
||||
SavePrefabsInDialog(savePrefabsDialog.get());
|
||||
SavePrefabsInDialog(savePrefabDialog.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1148,7 +1148,7 @@ namespace AzToolsFramework
|
||||
}
|
||||
}
|
||||
|
||||
AZStd::unique_ptr<QDialog> PrefabIntegrationManager::ConstructSavePrefabsDialog(TemplateId templateId, bool useSaveAllPrefabsPreference)
|
||||
AZStd::unique_ptr<QDialog> PrefabIntegrationManager::ConstructSavePrefabDialog(TemplateId templateId, bool useSaveAllPrefabsPreference)
|
||||
{
|
||||
AZStd::unique_ptr<QDialog> saveModifiedMessageBox = AZStd::make_unique<QDialog>(AzToolsFramework::GetActiveWindow());
|
||||
|
||||
|
||||
+2
-2
@@ -77,7 +77,7 @@ namespace AzToolsFramework
|
||||
// PrefabIntegrationInterface...
|
||||
AZ::EntityId CreateNewEntityAtPosition(const AZ::Vector3& position, AZ::EntityId parentId) override;
|
||||
int ExecuteClosePrefabDialog(TemplateId templateId) override;
|
||||
void ExecuteSavePrefabsDialog(TemplateId templateId, bool useSaveAllPrefabsPreference) override;
|
||||
void ExecuteSavePrefabDialog(TemplateId templateId, bool useSaveAllPrefabsPreference) override;
|
||||
|
||||
private:
|
||||
// Manages the Edit Mode UI for prefabs
|
||||
@@ -132,7 +132,7 @@ namespace AzToolsFramework
|
||||
|
||||
AZStd::shared_ptr<QDialog> ConstructClosePrefabDialog(TemplateId templateId);
|
||||
AzQtComponents::Card* ConstructUnsavedPrefabsCard(TemplateId templateId);
|
||||
AZStd::unique_ptr<QDialog> ConstructSavePrefabsDialog(TemplateId templateId, bool useSaveAllPrefabsPreference);
|
||||
AZStd::unique_ptr<QDialog> ConstructSavePrefabDialog(TemplateId templateId, bool useSaveAllPrefabsPreference);
|
||||
void SavePrefabsInDialog(QDialog* unsavedPrefabsDialog);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user