Skip to content

Commit

Permalink
fix: follow selected item in entry tree when navigating in dir preview
Browse files Browse the repository at this point in the history
  • Loading branch information
craftablescience committed Sep 17, 2023
1 parent be7c769 commit d14dae7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/EntryTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,13 @@ void EntryTree::loadVPK(VPK& vpk, QProgressBar* progressBar, const std::function
void EntryTree::selectSubItem(const QString& name) {
for (auto* selected : this->selectedItems()) {
selected->setSelected(false);
selected->setExpanded(true);
for (int i = 0; i < selected->childCount(); ++i) {
auto* child = selected->child(i);
if (child->text(0) == name) {
child->setSelected(true);
this->onItemClicked(child, 0);
child->setExpanded(true);
}
}
}
Expand Down

0 comments on commit d14dae7

Please sign in to comment.