From a8dfba6348a167426b84fb50f1fc031eb7121c62 Mon Sep 17 00:00:00 2001 From: Matteo Sozzi Date: Mon, 1 Feb 2021 21:27:39 +0100 Subject: [PATCH] HackStudio: tree_view on_activiation changes When opening a file in the tree view with _double click_, the file name was not the same as opening the same file with _right click > Open_. This caused the opne_files_view to have the same file in it, but with two different names. --- Userland/DevTools/HackStudio/HackStudioWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index 2bcbdfe0d08..2effe95615a 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -672,7 +672,7 @@ void HackStudioWidget::create_project_tree_view(GUI::Widget& parent) }; m_project_tree_view->on_activation = [this](auto& index) { - auto filename = index.data(GUI::ModelRole::Custom).to_string(); + auto filename = index.data().as_string(); open_file(filename); }; }