mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 07:18:40 +01:00
Tracker: Fix regression from hrev58264
From Code simplifications a4a5800e5f
In file panel switching dirs using the menu field got broken.
Change-Id: I2e9d75ba62082be27a85dbfa12e30a324f9fb440
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8501
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
parent
53cab618ef
commit
b230e1d06b
@ -547,13 +547,15 @@ TFilePanel::SetTo(const entry_ref* ref)
|
||||
if (ref == NULL)
|
||||
return;
|
||||
|
||||
BEntry entry(ref);
|
||||
entry_ref setToRef(*ref);
|
||||
bool isDesktop = SwitchDirToDesktopIfNeeded(setToRef);
|
||||
BEntry entry(&setToRef);
|
||||
if (entry.InitCheck() != B_OK || !entry.IsDirectory())
|
||||
return;
|
||||
|
||||
entry_ref _ref(*ref);
|
||||
PoseView()->SetIsDesktop(SwitchDirToDesktopIfNeeded(_ref));
|
||||
SwitchDirMenuTo(&_ref);
|
||||
PoseView()->SetIsDesktop(isDesktop);
|
||||
PoseView()->SwitchDir(&setToRef);
|
||||
SwitchDirMenuTo(&setToRef);
|
||||
|
||||
AddShortcut('H', B_COMMAND_KEY, new BMessage(kSwitchToHome));
|
||||
// our shortcut got possibly removed because the home
|
||||
|
Loading…
Reference in New Issue
Block a user