diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 13:23:58 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 16:54:55 +0200 |
commit | 0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (patch) | |
tree | a27e497da7104dd0a64f98a04fa3067668735e91 /editor/editor_dir_dialog.cpp | |
parent | 710b34b70227becdc652b4ae027fe0ac47409642 (diff) | |
download | redot-engine-0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a.tar.gz |
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.
This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.
There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).
Part of #33027.
Diffstat (limited to 'editor/editor_dir_dialog.cpp')
-rw-r--r-- | editor/editor_dir_dialog.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/editor/editor_dir_dialog.cpp b/editor/editor_dir_dialog.cpp index cb87656382..3039c3adb5 100644 --- a/editor/editor_dir_dialog.cpp +++ b/editor/editor_dir_dialog.cpp @@ -38,7 +38,6 @@ #include "servers/display_server.h" void EditorDirDialog::_update_dir(TreeItem *p_item, EditorFileSystemDirectory *p_dir, const String &p_select_path) { - updating = true; String path = p_dir->get_path(); @@ -49,7 +48,6 @@ void EditorDirDialog::_update_dir(TreeItem *p_item, EditorFileSystemDirectory *p if (!p_item->get_parent()) { p_item->set_text(0, "res://"); } else { - if (!opened_paths.has(path) && (p_select_path == String() || !p_select_path.begins_with(path))) { p_item->set_collapsed(true); } @@ -61,14 +59,12 @@ void EditorDirDialog::_update_dir(TreeItem *p_item, EditorFileSystemDirectory *p //bool show_hidden = EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files"); updating = false; for (int i = 0; i < p_dir->get_subdir_count(); i++) { - TreeItem *ti = tree->create_item(p_item); _update_dir(ti, p_dir->get_subdir(i)); } } void EditorDirDialog::reload(const String &p_path) { - if (!is_visible()) { must_reload = true; return; @@ -82,7 +78,6 @@ void EditorDirDialog::reload(const String &p_path) { } void EditorDirDialog::_notification(int p_what) { - if (p_what == NOTIFICATION_ENTER_TREE) { EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &EditorDirDialog::reload), make_binds("")); reload(); @@ -110,7 +105,6 @@ void EditorDirDialog::_notification(int p_what) { } void EditorDirDialog::_item_collapsed(Object *p_item) { - TreeItem *item = Object::cast_to<TreeItem>(p_item); if (updating) @@ -127,7 +121,6 @@ void EditorDirDialog::_item_activated() { } void EditorDirDialog::ok_pressed() { - TreeItem *ti = tree->get_selected(); if (!ti) return; @@ -138,7 +131,6 @@ void EditorDirDialog::ok_pressed() { } void EditorDirDialog::_make_dir() { - TreeItem *ti = tree->get_selected(); if (!ti) { mkdirerr->set_text(TTR("Please select a base directory first.")); @@ -151,7 +143,6 @@ void EditorDirDialog::_make_dir() { } void EditorDirDialog::_make_dir_confirm() { - TreeItem *ti = tree->get_selected(); if (!ti) return; @@ -173,12 +164,10 @@ void EditorDirDialog::_make_dir_confirm() { } void EditorDirDialog::_bind_methods() { - ADD_SIGNAL(MethodInfo("dir_selected", PropertyInfo(Variant::STRING, "dir"))); } EditorDirDialog::EditorDirDialog() { - updating = false; set_title(TTR("Choose a Directory")); |