diff options
-rw-r--r-- | core/io/resource_loader.cpp | 3 | ||||
-rw-r--r-- | doc/classes/Area.xml | 8 | ||||
-rw-r--r-- | doc/classes/Area2D.xml | 8 | ||||
-rw-r--r-- | doc/classes/RigidBody.xml | 2 | ||||
-rw-r--r-- | doc/classes/RigidBody2D.xml | 2 | ||||
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 9 | ||||
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.h | 1 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 2 | ||||
-rw-r--r-- | scene/resources/tile_set.cpp | 3 |
10 files changed, 26 insertions, 14 deletions
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index 87add585eb..1351030d1e 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -202,7 +202,8 @@ RES ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p if (OS::get_singleton()->is_stdout_verbose()) print_line("load resource: " + local_path + " (cached)"); - + if (r_error) + *r_error = OK; return RES(ResourceCache::get(local_path)); } diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml index b74e767fd2..58fa99f7da 100644 --- a/doc/classes/Area.xml +++ b/doc/classes/Area.xml @@ -33,14 +33,14 @@ <return type="Array"> </return> <description> - Returns a list of intersecting [code]Area[/code]s. + Returns a list of intersecting [code]Area[/code]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. </description> </method> <method name="get_overlapping_bodies" qualifiers="const"> <return type="Array"> </return> <description> - Returns a list of intersecting [PhysicsBody]s. + Returns a list of intersecting [PhysicsBody]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. </description> </method> <method name="overlaps_area" qualifiers="const"> @@ -49,7 +49,7 @@ <argument index="0" name="area" type="Node"> </argument> <description> - If [code]true[/code] the given area overlaps the Area. + If [code]true[/code] the given area overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="overlaps_body" qualifiers="const"> @@ -58,7 +58,7 @@ <argument index="0" name="body" type="Node"> </argument> <description> - If [code]true[/code] the given body overlaps the Area. + If [code]true[/code] the given body overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="set_collision_layer_bit"> diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index 6a3f0e7645..ca395321e3 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -33,14 +33,14 @@ <return type="Array"> </return> <description> - Returns a list of intersecting [code]Area2D[/code]s. + Returns a list of intersecting [code]Area2D[/code]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. </description> </method> <method name="get_overlapping_bodies" qualifiers="const"> <return type="Array"> </return> <description> - Returns a list of intersecting [PhysicsBody2D]s. + Returns a list of intersecting [PhysicsBody2D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. </description> </method> <method name="overlaps_area" qualifiers="const"> @@ -49,7 +49,7 @@ <argument index="0" name="area" type="Node"> </argument> <description> - If [code]true[/code] the given area overlaps the Area2D. + If [code]true[/code] the given area overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="overlaps_body" qualifiers="const"> @@ -58,7 +58,7 @@ <argument index="0" name="body" type="Node"> </argument> <description> - If [code]true[/code] the given body overlaps the Area2D. + If [code]true[/code] the given body overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="set_collision_layer_bit"> diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml index 3c54f29c15..335112f5d7 100644 --- a/doc/classes/RigidBody.xml +++ b/doc/classes/RigidBody.xml @@ -39,7 +39,7 @@ <return type="Array"> </return> <description> - Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0 , see [method set_max_contacts_reported] to increase it. + Return a list of the bodies colliding with this one. By default, number of max contacts reported is at 0 , see [method set_max_contacts_reported] to increase it. Note that the result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="set_axis_velocity"> diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index c11e118df5..991e0fa3f4 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -67,7 +67,7 @@ <return type="Array"> </return> <description> - Returns a list of the bodies colliding with this one. Use [member contacts_reported] to set the maximum number reported. You must also set [member contact_monitor] to [code]true[/code]. + Returns a list of the bodies colliding with this one. Use [member contacts_reported] to set the maximum number reported. You must also set [member contact_monitor] to [code]true[/code]. Note that the result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="get_inertia" qualifiers="const"> diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 535ce79b30..b677017371 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -3915,7 +3915,7 @@ void SpatialEditor::set_state(const Dictionary &p_state) { if (d.has("snap_enabled")) { snap_enabled = d["snap_enabled"]; - tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_pressed(d["snap_enabled"]); + tool_option_button[TOOL_OPT_USE_SNAP]->set_pressed(d["snap_enabled"]); } if (d.has("translate_snap")) diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index 08679b781a..612bdb1d2a 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -583,6 +583,14 @@ void AutotileEditor::_notification(int p_what) { } } +void AutotileEditor::_changed_callback(Object *p_changed, const char *p_prop) { + if (p_prop == StringName("texture") || p_prop == StringName("is_autotile")) { + edit(tile_set.ptr()); + autotile_list->update(); + workspace->update(); + } +} + void AutotileEditor::_on_autotile_selected(int p_index) { if (get_current_tile() >= 0) { @@ -1581,6 +1589,7 @@ Vector2 AutotileEditor::snap_point(const Vector2 &point) { void AutotileEditor::edit(Object *p_node) { tile_set = Ref<TileSet>(Object::cast_to<TileSet>(p_node)); + tile_set->add_change_receptor(this); helper->set_tileset(tile_set); autotile_list->clear(); diff --git a/editor/plugins/tile_set_editor_plugin.h b/editor/plugins/tile_set_editor_plugin.h index 9bd3e23181..93d403deea 100644 --- a/editor/plugins/tile_set_editor_plugin.h +++ b/editor/plugins/tile_set_editor_plugin.h @@ -124,6 +124,7 @@ class AutotileEditor : public Control { protected: static void _bind_methods(); void _notification(int p_what); + virtual void _changed_callback(Object *p_changed, const char *p_prop); private: void _on_autotile_selected(int p_index); diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index f686dc52a0..aa4310da46 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -883,7 +883,7 @@ void TextEdit::_notification(int p_what) { } // give visual indication of empty selected line - if (selection.active && line >= selection.from_line && line <= selection.to_line) { + if (selection.active && line >= selection.from_line && line <= selection.to_line && char_margin >= xmargin_beg) { int char_w = cache.font->get_char_size(' ').width; VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(xmargin_beg + ofs_x, ofs_y, char_w, get_row_height()), cache.selection_color); } diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index 710612d5f4..4d200f5548 100644 --- a/scene/resources/tile_set.cpp +++ b/scene/resources/tile_set.cpp @@ -309,6 +309,7 @@ void TileSet::tile_set_texture(int p_id, const Ref<Texture> &p_texture) { ERR_FAIL_COND(!tile_map.has(p_id)); tile_map[p_id].texture = p_texture; emit_changed(); + _change_notify("texture"); } Ref<Texture> TileSet::tile_get_texture(int p_id) const { @@ -386,8 +387,8 @@ void TileSet::tile_set_is_autotile(int p_id, bool p_is_autotile) { ERR_FAIL_COND(!tile_map.has(p_id)); tile_map[p_id].is_autotile = p_is_autotile; - _change_notify(""); emit_changed(); + _change_notify("is_autotile"); } bool TileSet::tile_get_is_autotile(int p_id) const { |