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:
Andreas Kling 2020-11-19 21:53:24 +01:00
parent da413a464a
commit f72f4c5bca
Notes: sideshowbarker 2024-07-19 01:20:45 +09:00
2 changed files with 0 additions and 13 deletions

View file

@ -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);
}
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)
{
if (!model())

View file

@ -94,7 +94,6 @@ protected:
AbstractTableView();
virtual void mousedown_event(MouseEvent&) override;
virtual void doubleclick_event(MouseEvent&) override;
virtual void context_menu_event(ContextMenuEvent&) override;
virtual void keydown_event(KeyEvent&) override;
virtual void resize_event(ResizeEvent&) override;