Tracker: Repopulate menus when entering/leaving volumes

Change-Id: Ifef64abb6ae2865d281b66fd2de7e2b7ba067ca6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8003
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
John Scipione 2024-08-09 15:15:38 -04:00 committed by waddlesplash
parent 8717bb87dd
commit 6edfc6e012

View File

@ -1452,6 +1452,7 @@ BContainerWindow::MessageReceived(BMessage* message)
bool wasInTrash = IsTrash() || InTrash();
bool isRoot = TargetModel()->IsRoot();
bool isVolume = TargetModel()->IsVolume();
// Switch dir and apply new state
WindowStateNodeOpener opener(this, false);
@ -1463,8 +1464,8 @@ BContainerWindow::MessageReceived(BMessage* message)
fIsTrash = FSIsTrashDir(&entry);
fInTrash = FSInTrashDir(&ref);
if (wasInTrash ^ (IsTrash() || InTrash())
|| isRoot != TargetModel()->IsRoot()) {
if (wasInTrash ^ (IsTrash() || InTrash()) || isRoot != TargetModel()->IsRoot()
|| isVolume != TargetModel()->IsVolume()) {
RepopulateMenus();
}