소스 검색

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.
Matteo Sozzi 4 년 전
부모
커밋
a8dfba6348
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Userland/DevTools/HackStudio/HackStudioWidget.cpp

+ 1 - 1
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);
     };
 }