You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
fix(tileset): Recreate custom data editor if type has changed
Signed-off-by: MisterMX <mbxd12@web.de>
This commit is contained in:
@@ -1137,6 +1137,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) {
|
||||
@@ -1181,6 +1182,10 @@ void TileDataDefaultEditor::_notification(int p_what) {
|
||||
}
|
||||
}
|
||||
|
||||
Variant::Type TileDataDefaultEditor::get_property_type() {
|
||||
return property_type;
|
||||
}
|
||||
|
||||
TileDataDefaultEditor::TileDataDefaultEditor() {
|
||||
undo_redo = EditorNode::get_undo_redo();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user