mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 04:55:15 +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
Notes:
sideshowbarker
2024-07-19 01:20:45 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/f72f4c5bcad
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);
|
||||
}
|
||||
|
||||
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())
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue