summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp2
-rw-r--r--editor/plugins/script_editor_plugin.cpp4
-rw-r--r--editor/plugins/shader_editor_plugin.cpp2
-rw-r--r--editor/plugins/shader_file_editor_plugin.cpp2
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp2
5 files changed, 6 insertions, 6 deletions
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index e99ffe2b83..49e67f3605 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -369,7 +369,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
} else {
const real_t grab_threshold = EDITOR_GET("editors/poly_editor/point_grab_radius");
- if (!_is_line() && wip.size() > 1 && xform.xform(wip[0]).distance_to(gpoint) < grab_threshold) {
+ if (!_is_line() && wip.size() > 1 && xform.xform(wip[0]).distance_to(xform.xform(cpoint)) < grab_threshold) {
//wip closed
_wip_close();
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 96079d5418..72d287c35c 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -538,7 +538,7 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) {
ScriptEditorBase *current = Object::cast_to<ScriptEditorBase>(tab_container->get_child(selected));
if (current) {
if (p_save) {
- apply_scripts();
+ _menu_option(FILE_SAVE);
}
Ref<Script> script = current->get_edited_resource();
@@ -1337,7 +1337,7 @@ void ScriptEditor::_notification(int p_what) {
editor->disconnect("stop_pressed", callable_mp(this, &ScriptEditor::_editor_stop));
} break;
- case NOTIFICATION_WM_FOCUS_IN: {
+ case NOTIFICATION_WM_WINDOW_FOCUS_IN: {
_test_script_times_on_disk();
_update_modified_scripts_for_external_editor();
} break;
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index 0c3a44e4cd..7dd0b8a238 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -338,7 +338,7 @@ void ShaderEditor::_menu_option(int p_option) {
}
void ShaderEditor::_notification(int p_what) {
- if (p_what == NOTIFICATION_WM_FOCUS_IN) {
+ if (p_what == NOTIFICATION_WM_WINDOW_FOCUS_IN) {
_check_for_external_edit();
}
}
diff --git a/editor/plugins/shader_file_editor_plugin.cpp b/editor/plugins/shader_file_editor_plugin.cpp
index 0ac29f68f6..f15a801530 100644
--- a/editor/plugins/shader_file_editor_plugin.cpp
+++ b/editor/plugins/shader_file_editor_plugin.cpp
@@ -200,7 +200,7 @@ void ShaderFileEditor::_update_options() {
}
void ShaderFileEditor::_notification(int p_what) {
- if (p_what == NOTIFICATION_WM_FOCUS_IN) {
+ if (p_what == NOTIFICATION_WM_WINDOW_FOCUS_IN) {
if (is_visible_in_tree() && shader_file.is_valid()) {
_update_options();
}
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 3a92818779..762f42abeb 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -780,7 +780,7 @@ void TextureRegionEditor::_notification(int p_what) {
_update_autoslice();
}
} break;
- case NOTIFICATION_WM_FOCUS_IN: {
+ case NOTIFICATION_WM_WINDOW_FOCUS_IN: {
// This happens when the user leaves the Editor and returns,
// they could have changed the textures, so the cache is cleared.
cache_map.clear();