From b2cd92d937e221bbf84be4184b876f17cfbfae2b Mon Sep 17 00:00:00 2001 From: godric3 Date: Sat, 3 Feb 2024 10:36:47 +0100 Subject: [PATCH] Fix initializing map editor mod settings with more than one level of submods --- mapeditor/mapsettings/modsettings.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mapeditor/mapsettings/modsettings.cpp b/mapeditor/mapsettings/modsettings.cpp index 5926542e5..330cb9c82 100644 --- a/mapeditor/mapsettings/modsettings.cpp +++ b/mapeditor/mapsettings/modsettings.cpp @@ -78,9 +78,8 @@ void ModSettings::initialize(MapController & c) auto pieces = qmodName.split("."); assert(pieces.size() > 1); - QString qs; - for(int i = 0; i < pieces.size() - 1; ++i) - qs += pieces[i]; + pieces.pop_back(); + auto qs = pieces.join("."); if(addedMods.count(qs)) {