mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 12:07:45 +00:00
CharacterMap: Pause updates while generating search results
Co-authored-by: Tim Flynn <trflynn89@pm.me>
This commit is contained in:
parent
725a758c66
commit
bb8bd48dc0
1 changed files with 4 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Sam Atkins <atkinssj@serenityos.org>
|
||||
* Copyright (c) 2022-2023, Sam Atkins <atkinssj@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
|
@ -79,6 +79,9 @@ CharacterSearchWidget::CharacterSearchWidget()
|
|||
|
||||
void CharacterSearchWidget::search()
|
||||
{
|
||||
ScopeGuard guard { [&] { m_results_table->set_updates_enabled(true); } };
|
||||
m_results_table->set_updates_enabled(false);
|
||||
|
||||
// TODO: Sort the results nicely. They're sorted by code-point for now, which is easy, but not the most useful.
|
||||
// Sorting intelligently in a style similar to Assistant would be nicer.
|
||||
auto& model = static_cast<CharacterSearchModel&>(*m_results_table->model());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue