Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software
ArmarX
RobotAPI
Commits
67c2358a
Commit
67c2358a
authored
1 year ago
by
Peter Albrecht
Browse files
Options
Downloads
Patches
Plain Diff
fix: search changes skill order
parent
98786ba3
No related branches found
No related tags found
1 merge request
!428
Implement wildcard for skill search
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/RobotAPI/libraries/skills_gui/skills/SkillTreeWidget.cpp
+11
-0
11 additions, 0 deletions
.../RobotAPI/libraries/skills_gui/skills/SkillTreeWidget.cpp
source/RobotAPI/libraries/skills_gui/skills/SkillTreeWidget.h
+2
-0
2 additions, 0 deletions
...ce/RobotAPI/libraries/skills_gui/skills/SkillTreeWidget.h
with
13 additions
and
0 deletions
source/RobotAPI/libraries/skills_gui/skills/SkillTreeWidget.cpp
+
11
−
0
View file @
67c2358a
...
...
@@ -27,6 +27,7 @@ namespace armarx::skills::gui
void
SkillTreeWidget
::
updateSkills
()
{
setSortingEnabled
(
false
);
const
auto
skills
=
memory
->
fetchSkills
();
// update tree view. Remove non-existing elements
...
...
@@ -76,6 +77,7 @@ namespace armarx::skills::gui
// update tree view. Add new elements
for
(
const
auto
&
[
providerId
,
providedSkills
]
:
skills
)
{
bool
newProvider
=
false
;
QTreeWidgetItem
*
providerItem
=
nullptr
;
for
(
int
i
=
0
;
i
<
this
->
topLevelItemCount
();
++
i
)
{
...
...
@@ -94,6 +96,8 @@ namespace armarx::skills::gui
{
providerItem
=
new
QTreeWidgetItem
(
this
);
providerItem
->
setText
(
0
,
QString
::
fromStdString
(
providerId
.
providerName
));
// expand new items
newProvider
=
true
;
}
for
(
const
auto
&
[
skillId
,
skill
]
:
providedSkills
)
...
...
@@ -118,7 +122,14 @@ namespace armarx::skills::gui
skillItem
->
setText
(
0
,
QString
::
fromStdString
(
skillId
.
skillName
));
}
}
if
(
newProvider
)
providerItem
->
setExpanded
(
true
);
}
setSortingEnabled
(
true
);
sortByColumn
(
0
,
Qt
::
AscendingOrder
);
sortByColumn
(
1
,
Qt
::
AscendingOrder
);
}
void
...
...
This diff is collapsed.
Click to expand it.
source/RobotAPI/libraries/skills_gui/skills/SkillTreeWidget.h
+
2
−
0
View file @
67c2358a
...
...
@@ -51,6 +51,8 @@ namespace armarx::skills::gui
private
:
SelectedSkill
selectedSkill
;
static
const
constexpr
bool
PROVIDER_EXPANDED_DEFAULT
=
true
;
void
setupUi
();
void
connectSignals
();
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment