1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-04 11:57:35 +00:00

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

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;