diff --git a/CMakeLists.txt b/CMakeLists.txt index ac912b3..8772da6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.25) -project(Limo VERSION 1.2.1 LANGUAGES CXX) +project(Limo VERSION 1.2.2 LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) diff --git a/flatpak/io.github.limo_app.limo.metainfo.xml b/flatpak/io.github.limo_app.limo.metainfo.xml index aec8f33..3cd7320 100644 --- a/flatpak/io.github.limo_app.limo.metainfo.xml +++ b/flatpak/io.github.limo_app.limo.metainfo.xml @@ -41,6 +41,14 @@ + + +

Minor FOMOD fix

+
    +
  • Fixed root level detection for FOMOD
  • +
+
+

Root level detection improvements

diff --git a/install_files/changelogs.json b/install_files/changelogs.json index 262f63b..ede1bec 100644 --- a/install_files/changelogs.json +++ b/install_files/changelogs.json @@ -1,6 +1,18 @@ { "versions": [ + { + "version" : "1.2.2", + "date" : 1746262543, + "title" : "Minor FOMOD fix", + "changes" : + [ + { + "type" : 2, + "short_description" : "Fixed root level detection for FOMOD" + } + ] + }, { "version" : "1.2.1", "date" : 1746216782, diff --git a/src/core/consts.h b/src/core/consts.h index 4e04606..6b991cc 100644 --- a/src/core/consts.h +++ b/src/core/consts.h @@ -1,4 +1,4 @@ #pragma once -constexpr char APP_VERSION[] = "1.2.1"; +constexpr char APP_VERSION[] = "1.2.2"; constexpr char APP_INSTALL_PREFIX[] = "/usr/local"; diff --git a/src/ui/addmoddialog.cpp b/src/ui/addmoddialog.cpp index ff1bc88..d9b2a15 100644 --- a/src/ui/addmoddialog.cpp +++ b/src/ui/addmoddialog.cpp @@ -253,6 +253,7 @@ bool AddModDialog::setupDialog(const QStringList& deployers, if(!info.version_overwrite.empty()) ui->version_text->setText(info.version_overwrite.c_str()); + bool root_level_checked = false; ui->installer_box->clear(); int root_level = 0; std::string prefix; @@ -270,6 +271,7 @@ bool AddModDialog::setupDialog(const QStringList& deployers, } if(detected_type == Installer::FOMODINSTALLER) { + root_level_checked = true; auto [name, version] = fomod::FomodInstaller::getMetaData(info.current_path / prefix); if(!name.empty() && info.name_overwrite.empty()) ui->name_text->setText(name.c_str()); @@ -361,15 +363,17 @@ bool AddModDialog::setupDialog(const QStringList& deployers, return false; } - bool root_level_checked = false; - for(const auto& condition : root_level_conditions) + if(!root_level_checked) { - if(auto level = condition.detectRootLevel(ui->content_tree->invisibleRootItem()); - level && *level >= 0) + for(const auto& condition : root_level_conditions) { - root_level_checked = true; - ui->root_level_box->setValue(std::min(std::max(0, *level), directory_tree_depth_ - 1)); - break; + if(auto level = condition.detectRootLevel(ui->content_tree->invisibleRootItem()); + level && *level >= 0) + { + root_level_checked = true; + ui->root_level_box->setValue(std::min(std::max(0, *level), directory_tree_depth_ - 1)); + break; + } } }