mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +00:00
HackStudio: Make actions with project tree selections work as expected
Creating a file while having a file or directory selected will now create the file under the selected directory, or in same directory as a selected file. Creating directories works the same way. Right click -> Open on selected files will now open the selected files. Deleting selected files will now delete the selected files. As suggested by sagefarrenholz this was accomplished by adding a private function HackStudioWidget::selected_file_paths() that returns a Vector<String> of the current project tree selection. Function HackStudioWidget::selected_file_names() is removed due to not being used.
This commit is contained in:
parent
c0235b596b
commit
fa9f5c9799
2 changed files with 58 additions and 10 deletions
|
@ -54,8 +54,6 @@ public:
|
|||
virtual ~HackStudioWidget() override;
|
||||
void open_file(const String& filename);
|
||||
|
||||
Vector<String> selected_file_names() const;
|
||||
|
||||
void update_actions();
|
||||
Project& project();
|
||||
GUI::TextEditor& current_editor();
|
||||
|
@ -73,6 +71,7 @@ public:
|
|||
|
||||
private:
|
||||
static String get_full_path_of_serenity_source(const String& file);
|
||||
Vector<String> selected_file_paths() const;
|
||||
|
||||
HackStudioWidget(const String& path_to_project);
|
||||
void open_project(const String& root_path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue