Ver código fonte

Always display all gems in Gem Catalog (#2341)

Signed-off-by: AMZN-alexpete <[email protected]>
Alex Peterson 4 anos atrás
pai
commit
38fd92a15a

+ 1 - 1
Code/Tools/ProjectManager/Source/CreateProjectCtrl.cpp

@@ -265,6 +265,6 @@ namespace O3DE::ProjectManager
     void CreateProjectCtrl::ReinitGemCatalogForSelectedTemplate()
     {
         const QString projectTemplatePath = m_newProjectSettingsScreen->GetProjectTemplatePath();
-        m_gemCatalogScreen->ReinitForProject(projectTemplatePath + "/Template", /*isNewProject=*/true);
+        m_gemCatalogScreen->ReinitForProject(projectTemplatePath + "/Template");
     }
 } // namespace O3DE::ProjectManager

+ 4 - 13
Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp

@@ -62,10 +62,10 @@ namespace O3DE::ProjectManager
         hLayout->addWidget(m_gemInspector);
     }
 
-    void GemCatalogScreen::ReinitForProject(const QString& projectPath, bool isNewProject)
+    void GemCatalogScreen::ReinitForProject(const QString& projectPath)
     {
         m_gemModel->clear();
-        FillModel(projectPath, isNewProject);
+        FillModel(projectPath);
 
         if (m_filterWidget)
         {
@@ -88,18 +88,9 @@ namespace O3DE::ProjectManager
             });
     }
 
-    void GemCatalogScreen::FillModel(const QString& projectPath, bool isNewProject)
+    void GemCatalogScreen::FillModel(const QString& projectPath)
     {
-        AZ::Outcome<QVector<GemInfo>, AZStd::string> allGemInfosResult;
-        if (isNewProject)
-        {
-            allGemInfosResult = PythonBindingsInterface::Get()->GetEngineGemInfos();
-        }
-        else
-        {
-            allGemInfosResult = PythonBindingsInterface::Get()->GetAllGemInfos(projectPath);
-        }
-
+        AZ::Outcome<QVector<GemInfo>, AZStd::string> allGemInfosResult = PythonBindingsInterface::Get()->GetAllGemInfos(projectPath);
         if (allGemInfosResult.IsSuccess())
         {
             // Add all available gems to the model.

+ 2 - 2
Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h

@@ -28,13 +28,13 @@ namespace O3DE::ProjectManager
         ~GemCatalogScreen() = default;
         ProjectManagerScreen GetScreenEnum() override;
 
-        void ReinitForProject(const QString& projectPath, bool isNewProject);
+        void ReinitForProject(const QString& projectPath);
         bool EnableDisableGemsForProject(const QString& projectPath);
 
         GemModel* GetGemModel() const { return m_gemModel; }
 
     private:
-        void FillModel(const QString& projectPath, bool isNewProject);
+        void FillModel(const QString& projectPath);
 
         GemListView* m_gemListView = nullptr;
         GemInspector* m_gemInspector = nullptr;

+ 1 - 1
Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp

@@ -94,7 +94,7 @@ namespace O3DE::ProjectManager
         Update();
 
         // Gather the available gems that will be shown in the gem catalog.
-        m_gemCatalogScreen->ReinitForProject(m_projectInfo.m_path, /*isNewProject=*/false);
+        m_gemCatalogScreen->ReinitForProject(m_projectInfo.m_path);
     }
 
     void UpdateProjectCtrl::HandleGemsButton()