diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-17 13:49:02 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-17 13:49:02 +0100 |
commit | 2ca972ad01e8000aff639c691abce325f1ac01cf (patch) | |
tree | 67851e46f6727ff834c4baccea45c09fc313b72f /editor/plugins/tiles/tile_data_editors.cpp | |
parent | 4829911df27ad6673bf0a62dd8dfd91ead46d627 (diff) | |
parent | b6c1a03d6ce02df531fea663256e99daa756d439 (diff) |
Merge pull request #66557 from MisterMX/fix/tileset-custom-data-type-reload-editor
fix(tileset): Recreate custom data editor if type has changed
Diffstat (limited to 'editor/plugins/tiles/tile_data_editors.cpp')
-rw-r--r-- | editor/plugins/tiles/tile_data_editors.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp index a7d90856ac..ce176e3a99 100644 --- a/editor/plugins/tiles/tile_data_editors.cpp +++ b/editor/plugins/tiles/tile_data_editors.cpp @@ -1138,6 +1138,7 @@ void TileDataDefaultEditor::draw_over_tile(CanvasItem *p_canvas_item, Transform2 void TileDataDefaultEditor::setup_property_editor(Variant::Type p_type, String p_property, String p_label, Variant p_default_value) { ERR_FAIL_COND_MSG(!property.is_empty(), "Cannot setup TileDataDefaultEditor twice"); property = p_property; + property_type = p_type; // Update everything. if (property_editor) { @@ -1182,6 +1183,10 @@ void TileDataDefaultEditor::_notification(int p_what) { } } +Variant::Type TileDataDefaultEditor::get_property_type() { + return property_type; +} + TileDataDefaultEditor::TileDataDefaultEditor() { undo_redo = EditorNode::get_undo_redo(); |