summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2021-11-21 18:39:46 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2021-11-21 18:39:46 +0800
commitabd41dedb00b8526517ab2e5231c2065e7b96768 (patch)
tree5eed54a19cfa210ea439b100295d5a2932806520
parented02b8af59fceb48798c857306335fe0f7ff6a8a (diff)
downloadredot-engine-abd41dedb00b8526517ab2e5231c2065e7b96768.tar.gz
Fix Theme Editor crash when clicking the element picker
-rw-r--r--editor/plugins/theme_editor_preview.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/plugins/theme_editor_preview.cpp b/editor/plugins/theme_editor_preview.cpp
index df0b35908b..f13fcb005f 100644
--- a/editor/plugins/theme_editor_preview.cpp
+++ b/editor/plugins/theme_editor_preview.cpp
@@ -71,6 +71,9 @@ void ThemeEditorPreview::_preview_visibility_changed() {
void ThemeEditorPreview::_picker_button_cbk() {
picker_overlay->set_visible(picker_button->is_pressed());
+ if (picker_button->is_pressed()) {
+ _reset_picker_overlay();
+ }
}
Control *ThemeEditorPreview::_find_hovered_control(Control *p_parent, Vector2 p_mouse_position) {