mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
LibGUI: Remove AbstractTableView::doubleclick_event()
This work is already done (and more correctly) by the parent class (AbstractView) if we just let it take care of the event instead. Fixes the root cause of #4096.
This commit is contained in:
parent
da413a464a
commit
f72f4c5bca
2 changed files with 0 additions and 13 deletions
|
@ -242,18 +242,6 @@ void AbstractTableView::scroll_into_view(const ModelIndex& index, bool scroll_ho
|
||||||
ScrollableWidget::scroll_into_view(content_rect(index), scroll_horizontally, scroll_vertically);
|
ScrollableWidget::scroll_into_view(content_rect(index), scroll_horizontally, scroll_vertically);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractTableView::doubleclick_event(MouseEvent& event)
|
|
||||||
{
|
|
||||||
if (!model())
|
|
||||||
return;
|
|
||||||
if (event.button() == MouseButton::Left) {
|
|
||||||
if (is_editable() && edit_triggers() & EditTrigger::DoubleClicked)
|
|
||||||
begin_editing(cursor_index());
|
|
||||||
else
|
|
||||||
activate(cursor_index());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void AbstractTableView::context_menu_event(ContextMenuEvent& event)
|
void AbstractTableView::context_menu_event(ContextMenuEvent& event)
|
||||||
{
|
{
|
||||||
if (!model())
|
if (!model())
|
||||||
|
|
|
@ -94,7 +94,6 @@ protected:
|
||||||
AbstractTableView();
|
AbstractTableView();
|
||||||
|
|
||||||
virtual void mousedown_event(MouseEvent&) override;
|
virtual void mousedown_event(MouseEvent&) override;
|
||||||
virtual void doubleclick_event(MouseEvent&) override;
|
|
||||||
virtual void context_menu_event(ContextMenuEvent&) override;
|
virtual void context_menu_event(ContextMenuEvent&) override;
|
||||||
virtual void keydown_event(KeyEvent&) override;
|
virtual void keydown_event(KeyEvent&) override;
|
||||||
virtual void resize_event(ResizeEvent&) override;
|
virtual void resize_event(ResizeEvent&) override;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue