1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00

LibGUI+Applications: Rename Model::is_valid to is_within_range

The previous name did not describe what the function checked, and was
easy to confuse with ModelIndex::is_valid.
This commit is contained in:
sin-ack 2021-06-27 12:08:16 +00:00 committed by Andreas Kling
parent 9899addb1d
commit 16ac3bbfd7
8 changed files with 18 additions and 18 deletions

View file

@ -295,8 +295,8 @@ void ColumnsView::move_cursor(CursorMovement movement, SelectionUpdate selection
break;
case CursorMovement::Right:
new_index = model.index(0, m_model_column, cursor_index());
if (model.is_valid(new_index)) {
if (model.is_valid(cursor_index()))
if (model.is_within_range(new_index)) {
if (model.is_within_range(cursor_index()))
push_column(cursor_index());
update();
}