From 49183b8f26d2f08fc26511b8af22f4a4c112e15a Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Sat, 16 Aug 2025 12:19:32 +0200 Subject: [PATCH] Disable edit button in the Launcher if we start with a built-in profile --- apps/OpenSpace/ext/launcher/src/launcherwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp index a5e9f0d0a2..9522db71bc 100644 --- a/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp +++ b/apps/OpenSpace/ext/launcher/src/launcherwindow.cpp @@ -240,7 +240,9 @@ LauncherWindow::LauncherWindow(bool profileEnabled, const Configuration& globalC { // Set up the default value for the edit button std::string selection = std::get<1>(_profileBox->currentSelection()); - _editProfileButton->setEnabled(std::filesystem::exists(selection)); + const bool exists = std::filesystem::exists(selection); + const bool isUser = selection.starts_with(_userProfilePath.string()); + _editProfileButton->setEnabled(isUser && exists); } {