summaryrefslogtreecommitdiff
path: root/DevTools/HackStudio
diff options
context:
space:
mode:
authorOriko <oriko1010@protonmail.com>2020-03-18 15:50:34 +0200
committerAndreas Kling <kling@serenityos.org>2020-03-18 16:33:54 +0100
commita1157027468bd9d5fc89f750e3daed5df09539b6 (patch)
treef61a90ea91369644b14bc7e86756341fb22eb0ab /DevTools/HackStudio
parent01408a511f7fff75d37691f97367ca54957abed9 (diff)
downloadserenity-a1157027468bd9d5fc89f750e3daed5df09539b6.zip
HackStudio: Expand project tree view by default
Diffstat (limited to 'DevTools/HackStudio')
-rw-r--r--DevTools/HackStudio/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/DevTools/HackStudio/main.cpp b/DevTools/HackStudio/main.cpp
index 5a5a128460..3359b87f9a 100644
--- a/DevTools/HackStudio/main.cpp
+++ b/DevTools/HackStudio/main.cpp
@@ -187,6 +187,7 @@ int main(int argc, char** argv)
// FIXME: Should we unlink the file here maybe?
return;
}
+ g_project_tree_view->toggle_index(g_project_tree_view->model()->index(0, 0));
open_file(filename);
});
@@ -199,6 +200,7 @@ int main(int argc, char** argv)
GUI::MessageBox::show(String::format("Failed to add '%s' to project", filename.characters()), "Error", GUI::MessageBox::Type::Error, GUI::MessageBox::InputType::OK, g_window);
return;
}
+ g_project_tree_view->toggle_index(g_project_tree_view->model()->index(0, 0));
open_file(filename);
});
@@ -249,6 +251,7 @@ int main(int argc, char** argv)
g_project_tree_view->set_model(g_project->model());
g_project_tree_view->set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fill);
g_project_tree_view->set_preferred_size(140, 0);
+ g_project_tree_view->toggle_index(g_project_tree_view->model()->index(0, 0));
g_project_tree_view->on_context_menu_request = [&](const GUI::ModelIndex& index, const GUI::ContextMenuEvent& event) {
if (index.is_valid()) {
@@ -573,6 +576,7 @@ void open_project(String filename)
ASSERT(g_project);
if (g_project_tree_view) {
g_project_tree_view->set_model(g_project->model());
+ g_project_tree_view->toggle_index(g_project_tree_view->model()->index(0, 0));
g_project_tree_view->update();
}
}