Skip to content

Commit

Permalink
TreeView didn't visually update when calling setItemIndexInParent or …
Browse files Browse the repository at this point in the history
…changeItemHierarchy
  • Loading branch information
texus committed Sep 25, 2024
1 parent 926f500 commit 99a3acc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ TGUI 1.6 (TBD)
- Fixed crash on exit when tool tip was visible
- Fixed wrong arrow sizes for horizontal spin button
- Fixed view not being usable in CanvasSFML
- TreeView didn't visually update when calling setItemIndexInParent or changeItemHierarchy


TGUI 1.5 (25 August 2024)
Expand Down
2 changes: 2 additions & 0 deletions src/Widgets/TreeView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ namespace tgui

parentNodes->erase(parentNodes->begin() + static_cast<std::ptrdiff_t>(currentIndex));
parentNodes->insert(parentNodes->begin() + static_cast<std::ptrdiff_t>(index), node);
markNodesDirty();
return true;
}

Expand Down Expand Up @@ -669,6 +670,7 @@ namespace tgui
// Update the moved node
node->text.setString(newHierarchy.back());
node->parent = newParentNode;
markNodesDirty();
return true;
}

Expand Down

0 comments on commit 99a3acc

Please sign in to comment.