summaryrefslogtreecommitdiffstats
path: root/editor/editor_properties.cpp
diff options
context:
space:
mode:
authorMichael Alexsander <michaelalexsander@protonmail.com>2024-05-21 12:05:15 -0300
committerMichael Alexsander <michaelalexsander@protonmail.com>2024-05-22 21:24:31 -0300
commite1798f4278a10de00d1d95e81031391f9ee16c61 (patch)
treec8ba81d1664221f8757ad6fd7537810fee115e8d /editor/editor_properties.cpp
parent8e2141eac534f6984bb0bdbcefbd17de27ae0993 (diff)
downloadredot-engine-e1798f4278a10de00d1d95e81031391f9ee16c61.tar.gz
Fix unchecking theme overrides not creating an undo action
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r--editor/editor_properties.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 49b30bd06e..fe50961b54 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -2645,7 +2645,7 @@ void EditorPropertyColor::_color_changed(const Color &p_color) {
}
void EditorPropertyColor::_popup_closed() {
- get_edited_object()->set(get_edited_property(), last_color);
+ get_edited_object()->set(get_edited_property(), was_checked ? Variant(last_color) : Variant());
if (!picker->get_pick_color().is_equal_approx(last_color)) {
emit_changed(get_edited_property(), picker->get_pick_color(), "", false);
}
@@ -2653,6 +2653,7 @@ void EditorPropertyColor::_popup_closed() {
void EditorPropertyColor::_picker_opening() {
last_color = picker->get_pick_color();
+ was_checked = !is_checkable() || is_checked();
}
void EditorPropertyColor::_notification(int p_what) {