diff options
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibGUI/ModelSelection.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Userland/Libraries/LibGUI/ModelSelection.cpp b/Userland/Libraries/LibGUI/ModelSelection.cpp index 1aa22a3d64..825384c280 100644 --- a/Userland/Libraries/LibGUI/ModelSelection.cpp +++ b/Userland/Libraries/LibGUI/ModelSelection.cpp @@ -29,10 +29,8 @@ void ModelSelection::set(const ModelIndex& index) void ModelSelection::add(const ModelIndex& index) { VERIFY(index.is_valid()); - if (m_indices.contains(index)) - return; - m_indices.set(index); - notify_selection_changed(); + if (m_indices.set(index) == AK::HashSetResult::InsertedNewEntry) + notify_selection_changed(); } void ModelSelection::add_all(const Vector<ModelIndex>& indices) |