From f7039435dab6cd6b1efe3b219772aa714c4cbf1a Mon Sep 17 00:00:00 2001 From: Laserlicht <13953785+Laserlicht@users.noreply.github.com> Date: Mon, 7 Oct 2024 22:55:48 +0200 Subject: [PATCH] fix vmap name --- client/lobby/SelectionTab.cpp | 3 ++- client/lobby/SelectionTab.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/client/lobby/SelectionTab.cpp b/client/lobby/SelectionTab.cpp index 75b8181ee..cdbe983ec 100644 --- a/client/lobby/SelectionTab.cpp +++ b/client/lobby/SelectionTab.cpp @@ -809,6 +809,7 @@ void SelectionTab::parseMaps(const std::unordered_set & files) { auto mapInfo = std::make_shared(); mapInfo->mapInit(file.getName()); + mapInfo->name = mapInfo->getNameForList(); if (isMapSupported(*mapInfo)) allItems.push_back(mapInfo); @@ -988,6 +989,6 @@ void SelectionTab::ListItem::updateItem(std::shared_ptr info, bool iconLossCondition->setFrame(info->mapHeader->defeatIconIndex, 0); labelName->setMaxWidth(185); } - labelName->setText(info->getNameForList()); + labelName->setText(info->name); labelName->setColor(color); } diff --git a/client/lobby/SelectionTab.h b/client/lobby/SelectionTab.h index 67e39047c..86c625a58 100644 --- a/client/lobby/SelectionTab.h +++ b/client/lobby/SelectionTab.h @@ -33,6 +33,7 @@ public: ElementInfo() : CMapInfo() { } ~ElementInfo() { } std::string folderName = ""; + std::string name = ""; bool isFolder = false; };