From dc46163b121993229fedc7853000bd9bcb9ec2de Mon Sep 17 00:00:00 2001 From: Hendrik Brucker Date: Thu, 11 May 2023 04:17:03 +0200 Subject: Improve editor state persistence --- editor/filesystem_dock.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'editor/filesystem_dock.h') diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h index e47178d294..37e325c873 100644 --- a/editor/filesystem_dock.h +++ b/editor/filesystem_dock.h @@ -125,7 +125,7 @@ private: Button *button_file_list_display_mode = nullptr; Button *button_hist_next = nullptr; Button *button_hist_prev = nullptr; - LineEdit *current_path = nullptr; + LineEdit *current_path_line_edit = nullptr; HBoxContainer *toolbar2_hbc = nullptr; LineEdit *tree_search_box = nullptr; @@ -185,7 +185,7 @@ private: int history_pos; int history_max_size; - String path; + String current_path; bool initialized = false; @@ -204,7 +204,6 @@ private: Ref _get_tree_item_icon(bool p_is_valid, String p_file_type); bool _create_tree(TreeItem *p_parent, EditorFileSystemDirectory *p_dir, Vector &uncollapsed_paths, bool p_select_in_favorites, bool p_unfold_path = false); - Vector _compute_uncollapsed_paths(); void _update_tree(const Vector &p_uncollapsed_paths = Vector(), bool p_uncollapse_root = false, bool p_select_in_favorites = false, bool p_unfold_path = false); void _navigate_to_path(const String &p_path, bool p_select_in_favorites = false); @@ -295,7 +294,7 @@ private: void _search(EditorFileSystemDirectory *p_path, List *matches, int p_max_items); - void _set_current_path_text(const String &p_path); + void _set_current_path_line_edit_text(const String &p_path); Variant get_drag_data_fw(const Point2 &p_point, Control *p_from); bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const; @@ -327,6 +326,7 @@ protected: public: Vector get_selected_paths() const; + Vector get_uncollapsed_paths() const; String get_current_path() const; String get_current_directory() const; @@ -351,6 +351,8 @@ public: void set_file_list_display_mode(FileListDisplayMode p_mode); FileListDisplayMode get_file_list_display_mode() { return file_list_display_mode; }; + Tree *get_tree_control() { return tree; } + FileSystemDock(); ~FileSystemDock(); }; -- cgit v1.2.3