From dc0463c1d9e498a26b35338b62404b8ffdec1d86 Mon Sep 17 00:00:00 2001
From: Peter Albrecht <albrecpe@gmail.com>
Date: Sat, 20 Jan 2024 23:26:45 +0100
Subject: [PATCH] Made profile-related widgets more descriptive

---
 .../skills_gui/skill_details/ProfileMenuWidget.cpp        | 3 ++-
 .../skills_gui/skill_details/ProfileMenuWidget.h          | 2 ++
 .../skills_gui/skill_details/SkillDetailsGroupBox.cpp     | 8 --------
 3 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/source/RobotAPI/libraries/skills_gui/skill_details/ProfileMenuWidget.cpp b/source/RobotAPI/libraries/skills_gui/skill_details/ProfileMenuWidget.cpp
index cff01b059..20295978a 100644
--- a/source/RobotAPI/libraries/skills_gui/skill_details/ProfileMenuWidget.cpp
+++ b/source/RobotAPI/libraries/skills_gui/skill_details/ProfileMenuWidget.cpp
@@ -34,8 +34,9 @@ namespace armarx::skills::gui
         setArgsFromClipboard->setText(QString::fromStdString(SET_ARGS_BUTTON_TEXT));
         copyArgsToClipboard->setText(QString::fromStdString(COPY_ARGS_BUTTON_TEXT));
         resetArgsToProfile->setText(QString::fromStdString(RESET_ARGS_BUTTON_TEXT));
-        profileSelector->setCurrentText(QString::fromStdString(DEFAULT_PROFILE_TEXT));
+        profileSelector->addItem(QString::fromStdString(DEFAULT_PROFILE_TEXT));
         profileSelector->setDisabled(true);
+        profileSelector->setToolTip(QString::fromStdString(PROFILE_NOT_IMPLEMENTED));
     }
 
 
diff --git a/source/RobotAPI/libraries/skills_gui/skill_details/ProfileMenuWidget.h b/source/RobotAPI/libraries/skills_gui/skill_details/ProfileMenuWidget.h
index 2041c2e9f..32dc1f278 100644
--- a/source/RobotAPI/libraries/skills_gui/skill_details/ProfileMenuWidget.h
+++ b/source/RobotAPI/libraries/skills_gui/skill_details/ProfileMenuWidget.h
@@ -17,6 +17,8 @@ namespace armarx::skills::gui
         static const constexpr char* COPY_ARGS_BUTTON_TEXT = "Copy Args to Clipboard";
         static const constexpr char* RESET_ARGS_BUTTON_TEXT = "Reset Args to Profile";
         static const constexpr char* DEFAULT_PROFILE_TEXT = "<No Profile selected. Using root>";
+        static const constexpr char* PROFILE_NOT_IMPLEMENTED =
+            "Profiles other than the root profile are currently not supported.";
 
         // contents are public, as this class is just a convenience wrapper
         QPushButton* setArgsFromClipboard = nullptr;
diff --git a/source/RobotAPI/libraries/skills_gui/skill_details/SkillDetailsGroupBox.cpp b/source/RobotAPI/libraries/skills_gui/skill_details/SkillDetailsGroupBox.cpp
index 95c1d5a9b..b54d55c8a 100644
--- a/source/RobotAPI/libraries/skills_gui/skill_details/SkillDetailsGroupBox.cpp
+++ b/source/RobotAPI/libraries/skills_gui/skill_details/SkillDetailsGroupBox.cpp
@@ -59,14 +59,6 @@ namespace armarx::skills::gui
         // description widget
         skillDescriptionWidget->setSkillDescription(descr);
 
-        // select root profile
-        profileMenuWidget->profileSelector->setCurrentIndex(0);
-
-        // remove any profile
-        while (profileMenuWidget->profileSelector->count() > 1)
-        {
-            profileMenuWidget->profileSelector->removeItem(1);
-        }
 
         // add new profiles for this skill
         // TODO: Where stored?
-- 
GitLab