summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_help.cpp2
-rw-r--r--editor/find_in_files.cpp57
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp8
-rw-r--r--editor/plugins/script_editor_plugin.cpp3
-rw-r--r--editor/project_export.cpp20
-rw-r--r--editor/project_export.h2
-rw-r--r--editor/property_selector.cpp2
-rw-r--r--editor/quick_open.cpp2
8 files changed, 46 insertions, 50 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index caa60eb645..3ee8d9c6c5 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -252,6 +252,8 @@ void EditorHelpSearch::_notification(int p_what) {
connect("confirmed", this, "_confirmed");
_update_search();
+ } else if (p_what == NOTIFICATION_EXIT_TREE) {
+ disconnect("confirmed", this, "_confirmed");
} else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
if (is_visible_in_tree()) {
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index 0ccaa95fb7..705bb1d9c5 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "find_in_files.h"
+
#include "core/os/dir_access.h"
#include "core/os/os.h"
#include "editor_node.h"
@@ -89,8 +90,6 @@ static bool find_next(const String &line, String pattern, int from, bool match_c
//--------------------------------------------------------------------------------
FindInFiles::FindInFiles() {
_root_prefix = ROOT_PREFIX;
- _extension_filter.insert("gd");
- _extension_filter.insert("cs");
_searching = false;
_whole_words = true;
_match_case = true;
@@ -301,8 +300,7 @@ const char *FindInFilesDialog::SIGNAL_REPLACE_REQUESTED = "replace_requested";
FindInFilesDialog::FindInFilesDialog() {
- set_custom_minimum_size(Size2(400, 190) * EDSCALE);
- set_resizable(true);
+ set_custom_minimum_size(Size2(500 * EDSCALE, 0));
set_title(TTR("Find in Files"));
VBoxContainer *vbc = memnew(VBoxContainer);
@@ -317,7 +315,7 @@ FindInFilesDialog::FindInFilesDialog() {
vbc->add_child(gc);
Label *find_label = memnew(Label);
- find_label->set_text(TTR("Find: "));
+ find_label->set_text(TTR("Find:"));
gc->add_child(find_label);
_search_text_line_edit = memnew(LineEdit);
@@ -326,10 +324,7 @@ FindInFilesDialog::FindInFilesDialog() {
_search_text_line_edit->connect("text_entered", this, "_on_search_text_entered");
gc->add_child(_search_text_line_edit);
- {
- Control *placeholder = memnew(Control);
- gc->add_child(placeholder);
- }
+ gc->add_child(memnew(Control)); // Space to mantain the grid aligned.
{
HBoxContainer *hbc = memnew(HBoxContainer);
@@ -346,7 +341,7 @@ FindInFilesDialog::FindInFilesDialog() {
}
Label *folder_label = memnew(Label);
- folder_label->set_text(TTR("Folder: "));
+ folder_label->set_text(TTR("Folder:"));
gc->add_child(folder_label);
{
@@ -374,7 +369,7 @@ FindInFilesDialog::FindInFilesDialog() {
}
Label *filter_label = memnew(Label);
- filter_label->set_text(TTR("Filter: "));
+ filter_label->set_text(TTR("Filters:"));
gc->add_child(filter_label);
{
@@ -382,7 +377,8 @@ FindInFilesDialog::FindInFilesDialog() {
Vector<String> exts;
exts.push_back("gd");
- exts.push_back("cs");
+ if (Engine::get_singleton()->has_singleton("GodotSharp"))
+ exts.push_back("cs");
for (int i = 0; i < exts.size(); ++i) {
CheckBox *cb = memnew(CheckBox);
@@ -395,39 +391,14 @@ FindInFilesDialog::FindInFilesDialog() {
gc->add_child(hbc);
}
- {
- Control *placeholder = memnew(Control);
- placeholder->set_custom_minimum_size(Size2(0, EDSCALE * 16));
- vbc->add_child(placeholder);
- }
-
- {
- HBoxContainer *hbc = memnew(HBoxContainer);
- hbc->set_alignment(HBoxContainer::ALIGN_CENTER);
-
- _find_button = add_button(TTR("Find..."), false, "find");
- _find_button->set_disabled(true);
-
- {
- Control *placeholder = memnew(Control);
- placeholder->set_custom_minimum_size(Size2(EDSCALE * 16, 0));
- hbc->add_child(placeholder);
- }
-
- _replace_button = add_button(TTR("Replace..."), false, "replace");
- _replace_button->set_disabled(true);
+ _find_button = add_button(TTR("Find..."), false, "find");
+ _find_button->set_disabled(true);
- {
- Control *placeholder = memnew(Control);
- placeholder->set_custom_minimum_size(Size2(EDSCALE * 16, 0));
- hbc->add_child(placeholder);
- }
-
- Button *cancel_button = get_ok();
- cancel_button->set_text(TTR("Cancel"));
+ _replace_button = add_button(TTR("Replace..."), false, "replace");
+ _replace_button->set_disabled(true);
- vbc->add_child(hbc);
- }
+ Button *cancel_button = get_ok();
+ cancel_button->set_text(TTR("Cancel"));
}
void FindInFilesDialog::set_search_text(String text) {
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 31dd20e453..45f7f36cbd 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -1696,13 +1696,7 @@ bool CanvasItemEditor::_gui_input_scale(const Ref<InputEvent> &p_event) {
if (drag_type == DRAG_SCALE_BOTH) {
Size2 scale_factor = drag_to_local / drag_from_local;
if (uniform) {
- if (ABS(offset.x) > ABS(offset.y)) {
- scale.x *= scale_factor.x;
- scale.y = scale.x * ratio;
- } else {
- scale.y *= scale_factor.y;
- scale.x = scale.y / ratio;
- }
+ scale *= (scale_factor.x + scale_factor.y) / 2.0;
} else {
scale *= scale_factor;
}
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 04011dbb2b..323dfa681b 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -210,6 +210,9 @@ void ScriptEditorQuickOpen::_notification(int p_what) {
search_box->set_right_icon(get_icon("Search", "EditorIcons"));
search_box->set_clear_button_enabled(true);
} break;
+ case NOTIFICATION_EXIT_TREE: {
+ disconnect("confirmed", this, "_confirmed");
+ } break;
}
}
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index a297f2d47e..f4f1f8068d 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -170,6 +170,7 @@ void ProjectExportDialog::_edit_preset(int p_index) {
if (p_index < 0 || p_index >= presets->get_item_count()) {
name->set_text("");
name->set_editable(false);
+ export_path->set_editable(false);
runnable->set_disabled(true);
parameters->edit(NULL);
presets->unselect_all();
@@ -191,9 +192,11 @@ void ProjectExportDialog::_edit_preset(int p_index) {
sections->show();
name->set_editable(true);
+ export_path->set_editable(true);
duplicate_preset->set_disabled(false);
delete_preset->set_disabled(false);
name->set_text(current->get_name());
+ export_path->set_text(current->get_export_path());
runnable->set_disabled(false);
runnable->set_pressed(current->is_runnable());
parameters->edit(current.ptr());
@@ -432,6 +435,18 @@ void ProjectExportDialog::_name_changed(const String &p_string) {
_update_presets();
}
+void ProjectExportDialog::_export_path_changed(const String &p_string) {
+
+ if (updating)
+ return;
+
+ Ref<EditorExportPreset> current = EditorExport::get_singleton()->get_export_preset(presets->get_current());
+ ERR_FAIL_COND(current.is_null());
+
+ current->set_export_path(p_string);
+ _update_presets();
+}
+
void ProjectExportDialog::_duplicate_preset() {
Ref<EditorExportPreset> current = EditorExport::get_singleton()->get_export_preset(presets->get_current());
@@ -929,6 +944,10 @@ ProjectExportDialog::ProjectExportDialog() {
runnable->connect("pressed", this, "_runnable_pressed");
settings_vb->add_child(runnable);
+ export_path = memnew(LineEdit);
+ settings_vb->add_margin_child(TTR("Export Path:"), export_path);
+ export_path->connect("text_changed", this, "_export_path_changed");
+
sections = memnew(TabContainer);
sections->set_tab_align(TabContainer::ALIGN_LEFT);
settings_vb->add_child(sections);
@@ -1019,6 +1038,7 @@ ProjectExportDialog::ProjectExportDialog() {
//disable by default
name->set_editable(false);
+ export_path->set_editable(false);
runnable->set_disabled(true);
duplicate_preset->set_disabled(true);
delete_preset->set_disabled(true);
diff --git a/editor/project_export.h b/editor/project_export.h
index a4bca843a8..23a6db8942 100644
--- a/editor/project_export.h
+++ b/editor/project_export.h
@@ -66,6 +66,7 @@ private:
ItemList *presets;
LineEdit *name;
+ LineEdit *export_path;
EditorInspector *parameters;
CheckButton *runnable;
@@ -107,6 +108,7 @@ private:
void _runnable_pressed();
void _update_parameters(const String &p_edited_property);
void _name_changed(const String &p_string);
+ void _export_path_changed(const String &p_string);
void _add_preset(int p_platform);
void _edit_preset(int p_index);
void _duplicate_preset();
diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp
index 9042bdc7c1..a8c97be936 100644
--- a/editor/property_selector.cpp
+++ b/editor/property_selector.cpp
@@ -394,6 +394,8 @@ void PropertySelector::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
connect("confirmed", this, "_confirmed");
+ } else if (p_what == NOTIFICATION_EXIT_TREE) {
+ disconnect("confirmed", this, "_confirmed");
}
}
diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp
index e48a0022e8..8dacc3c142 100644
--- a/editor/quick_open.cpp
+++ b/editor/quick_open.cpp
@@ -261,6 +261,8 @@ void EditorQuickOpen::_notification(int p_what) {
search_box->set_right_icon(get_icon("Search", "EditorIcons"));
search_box->set_clear_button_enabled(true);
+ } else if (p_what == NOTIFICATION_EXIT_TREE) {
+ disconnect("confirmed", this, "_confirmed");
}
}