1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 23:35:08 +00:00

GTreeView: On model selection change, open the selected index.

This commit is contained in:
Andreas Kling 2019-03-30 03:30:50 +01:00
parent 2c6a597d77
commit a535c7453f

View file

@ -293,6 +293,7 @@ void GTreeView::did_update_selection()
auto index = model.selected_index();
if (!index.is_valid())
return;
ensure_metadata_for_index(index).open = true;
auto parent = index.parent();
while (parent.is_valid()) {
ensure_metadata_for_index(parent).open = true;