diff options
| author | damarindra | 2018-01-11 05:45:14 +0700 |
|---|---|---|
| committer | damarindra | 2018-01-11 05:50:36 +0700 |
| commit | bea40343ab347d4819922e009a5b738dead057fc (patch) | |
| tree | 744c5ed79a33dcc7ab683accdd341735c6e332eb /editor/plugins/tile_set_editor_plugin.cpp | |
| parent | 554e95747c07afa893a2c4c0445370dda57aa7d0 (diff) | |
| download | godot-bea40343ab347d4819922e009a5b738dead057fc.tar.gz godot-bea40343ab347d4819922e009a5b738dead057fc.tar.zst godot-bea40343ab347d4819922e009a5b738dead057fc.zip | |
Diffstat (limited to 'editor/plugins/tile_set_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index 08679b781..612bdb1d2 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(); |
