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.
This commit is contained in:
Andreas Kling 2020-09-01 16:33:31 +02:00
parent 37df36dbed
commit daeb2bdc60
Notes: sideshowbarker 2024-07-19 02:56:53 +09:00

View file

@ -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;