diff options
author | Aaron Record <aaronjrecord@gmail.com> | 2022-07-29 23:35:34 -0600 |
---|---|---|
committer | Aaron Record <aaronjrecord@gmail.com> | 2022-08-27 11:52:29 -0600 |
commit | 4b817a565cab8af648c88cfc7ab6481e86ee3625 (patch) | |
tree | c12f7e186f04d71ea9731b1308d682f876262aed /tests/scene | |
parent | 4808d01b2bcda54db15e1e2649e0a38c37886ee1 (diff) |
Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED
Diffstat (limited to 'tests/scene')
-rw-r--r-- | tests/scene/test_code_edit.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/scene/test_code_edit.h b/tests/scene/test_code_edit.h index 4fc88f398f..be2e18bdf4 100644 --- a/tests/scene/test_code_edit.h +++ b/tests/scene/test_code_edit.h @@ -2943,6 +2943,10 @@ TEST_CASE("[SceneTree][CodeEdit] completion") { code_edit->set_code_completion_enabled(true); CHECK(code_edit->get_code_completion_selected_index() == -1); + // Need to flush here since `NOTIFICATION_THEME_CHANGED` is called deferred from `NOTIFICATION_ENTER_TREE`, + // and `update_code_completion_options` requires access to the theme's font size. + MessageQueue::get_singleton()->flush(); + code_edit->update_code_completion_options(); code_edit->set_code_completion_selected_index(1); CHECK(code_edit->get_code_completion_selected_index() == -1); |