diff options
Diffstat (limited to 'editor/dependency_editor.cpp')
-rw-r--r-- | editor/dependency_editor.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index d07d77c112..9879671e7b 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -75,7 +75,7 @@ void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, Map<String String path = efsd->get_file_path(i); for (KeyValue<String, String> &E : candidates[file]) { - if (E.value == String()) { + if (E.value.is_empty()) { E.value = path; continue; } @@ -135,7 +135,7 @@ void DependencyEditor::_fix_all() { for (KeyValue<String, Map<String, String>> &E : candidates) { for (const KeyValue<String, String> &F : E.value) { - if (F.value != String()) { + if (!F.value.is_empty()) { remaps[F.key] = F.value; } } @@ -270,12 +270,13 @@ DependencyEditor::DependencyEditor() { ///////////////////////////////////// void DependencyEditorOwners::_list_rmb_select(int p_item, const Vector2 &p_pos) { file_options->clear(); - file_options->set_size(Size2(1, 1)); + file_options->reset_size(); if (p_item >= 0) { file_options->add_item(TTR("Open"), FILE_OPEN); } - file_options->set_position(owners->get_global_position() + p_pos); + file_options->set_position(owners->get_screen_position() + p_pos); + file_options->reset_size(); file_options->popup(); } @@ -464,7 +465,7 @@ void DependencyRemoveDialog::show(const Vector<String> &p_folders, const Vector< if (removed_deps.is_empty()) { owners->hide(); text->set_text(TTR("Remove the selected files from the project? (Cannot be undone.)\nDepending on your filesystem configuration, the files will either be moved to the system trash or deleted permanently.")); - set_size(Size2()); + reset_size(); popup_centered(); } else { _build_removed_dependency_tree(removed_deps); |