Bakcported a change to the EditorInspector from:

Implement polygons editors in the tiles selection mode
- groud
cec004adf0
This commit is contained in:
Relintai 2024-03-08 16:06:42 +01:00
parent d1c0bc9cde
commit a44fb35ca1

View File

@ -3021,7 +3021,12 @@ void EditorInspector::_edit_set(const String &p_name, const Variant &p_value, bo
} else {
undo_redo->create_action(vformat(TTR("Set %s"), p_name), UndoRedo::MERGE_ENDS);
undo_redo->add_do_property(object, p_name, p_value);
undo_redo->add_undo_property(object, p_name, object->get(p_name));
bool valid = false;
Variant value = object->get(p_name, &valid);
if (valid) {
undo_redo->add_undo_property(object, p_name, value);
}
if (p_refresh_all) {
undo_redo->add_do_method(this, "_edit_request_change", object, "");