summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarol Kosek <krkk@krkk.ct8.pl>2021-08-02 15:12:09 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-11 01:50:33 +0200
commitb1bc5532e7ec5b3b42822b84fe57d8e79c3c3ee8 (patch)
treec1e4dc5d4a58b64f35d875542f70c70688110aa2
parent3ad2f1bfd1402ea6eac4c77767a09fbb34b1e864 (diff)
downloadserenity-b1bc5532e7ec5b3b42822b84fe57d8e79c3c3ee8.zip
HackStudio: Make "Open project" action open in the current project path
Prior this change, the action opened a File Picker in user home directory. Changing the startup path to a project path might make correcting the path or switching between different projects a bit faster, as you don't have to go through the subdirectories all over again. It's also the path that's showed in the project tree view.
-rw-r--r--Userland/DevTools/HackStudio/HackStudioWidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp
index d7da10e391..19d9de55a8 100644
--- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp
+++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp
@@ -587,7 +587,7 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_remove_current_editor_action
NonnullRefPtr<GUI::Action> HackStudioWidget::create_open_action()
{
return GUI::Action::create("&Open Project...", { Mod_Ctrl | Mod_Shift, Key_O }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/open.png"), [this](auto&) {
- auto open_path = GUI::FilePicker::get_open_filepath(window(), "Open project", Core::StandardPaths::home_directory(), true);
+ auto open_path = GUI::FilePicker::get_open_filepath(window(), "Open project", m_project->root_path(), true);
if (!open_path.has_value())
return;
open_project(open_path.value());