Преглед на файлове

Fix Theme Editor crash when clicking the element picker

Haoyu Qiu преди 3 години
родител
ревизия
abd41dedb0
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      editor/plugins/theme_editor_preview.cpp

+ 3 - 0
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) {