From 1cba898adedd3fa98e739b0d1919e2065027aee8 Mon Sep 17 00:00:00 2001 From: PancakeTAS Date: Thu, 25 Dec 2025 01:36:05 +0100 Subject: [PATCH] refactor(cleanup): fix active_in model --- lsfg-vk-ui/src/backend.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lsfg-vk-ui/src/backend.hpp b/lsfg-vk-ui/src/backend.hpp index 8c49115..692fd67 100644 --- a/lsfg-vk-ui/src/backend.hpp +++ b/lsfg-vk-ui/src/backend.hpp @@ -197,6 +197,7 @@ namespace lsfgvk::ui { ls::GameConf conf; conf.name = name.toStdString(); this->m_profiles.push_back(std::move(conf)); + this->m_active_in_list_models.push_back(new QStringListModel({}, this)); auto& model = this->m_profile_list_model; model->insertRow(model->rowCount()); @@ -220,6 +221,8 @@ namespace lsfgvk::ui { auto& profiles = this->m_profiles; profiles.erase(profiles.begin() + this->m_profile_index); + auto& active_in_models = this->m_active_in_list_models; + active_in_models.erase(active_in_models.begin() + this->m_profile_index); auto& model = this->m_profile_list_model; model->removeRow(this->m_profile_index); if (!this->m_profiles.empty())