mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-31 13:48:25 +00:00
LibGUI: Move index_at_event_position() up to GAbstractView
It's now an abstract (pure virtual) public method in GAbstractView that individual widgets have to implement. This will allow us to move more selection-related logic into GAbstractView in order to share it between implementations.
This commit is contained in:
committed by
Andreas Kling
parent
ff66101f9e
commit
91d3fc54be
@@ -396,6 +396,13 @@ GModelIndex GAbstractColumnView::index_at_event_position(const Point& position,
|
||||
return {};
|
||||
}
|
||||
|
||||
GModelIndex GAbstractColumnView::index_at_event_position(const Point& position) const
|
||||
{
|
||||
bool is_toggle;
|
||||
auto index = index_at_event_position(position, is_toggle);
|
||||
return is_toggle ? GModelIndex() : index;
|
||||
}
|
||||
|
||||
int GAbstractColumnView::item_count() const
|
||||
{
|
||||
if (!model())
|
||||
|
||||
Reference in New Issue
Block a user