1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Merge pull request #66557 from MisterMX/fix/tileset-custom-data-type-reload-editor

fix(tileset): Recreate custom data editor if type has changed
This commit is contained in:
Rémi Verschelde
2022-11-17 13:49:02 +01:00
3 changed files with 24 additions and 6 deletions

View File

@@ -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();