From daeb2bdc60f8ad04c5f216b44c9698002983eebf Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 1 Sep 2020 16:33:31 +0200 Subject: [PATCH] LibGUI: Don't return early from AbstractView::set_cursor() Calling set_cursor() with the same cursor index is not necessarily a no-op! For example, we may want to toggle the selection. --- Libraries/LibGUI/AbstractView.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/Libraries/LibGUI/AbstractView.cpp b/Libraries/LibGUI/AbstractView.cpp index f4a2eb28eb..634876a4c8 100644 --- a/Libraries/LibGUI/AbstractView.cpp +++ b/Libraries/LibGUI/AbstractView.cpp @@ -425,9 +425,6 @@ void AbstractView::set_key_column_and_sort_order(int column, SortOrder sort_orde void AbstractView::set_cursor(ModelIndex index, SelectionUpdate selection_update, bool scroll_cursor_into_view) { - if (m_cursor_index == index) - return; - if (!model() || !index.is_valid()) { m_cursor_index = {}; return;