mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibGUI: Fix GTreeView not showing the context menu
This logic is all taken care of by GAbstractColumnView now, so we can simply delete GTreeView::context_menu_event(). :^) Fixes an issue mentioned in #826
This commit is contained in:
parent
05a441afb2
commit
d4a570d576
Notes:
sideshowbarker
2024-07-19 10:51:12 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d4a570d576f
2 changed files with 0 additions and 14 deletions
|
@ -393,19 +393,6 @@ void GTreeView::keydown_event(GKeyEvent& event)
|
|||
}
|
||||
}
|
||||
|
||||
void GTreeView::context_menu_event(GContextMenuEvent& event)
|
||||
{
|
||||
if (!model())
|
||||
return;
|
||||
bool is_toggle;
|
||||
auto index = index_at_event_position(event.position(), is_toggle);
|
||||
if (index.is_valid()) {
|
||||
if (on_context_menu_request)
|
||||
on_context_menu_request(index, event);
|
||||
}
|
||||
GAbstractColumnView::context_menu_event(event);
|
||||
}
|
||||
|
||||
int GTreeView::item_count() const
|
||||
{
|
||||
int count = 0;
|
||||
|
|
|
@ -19,7 +19,6 @@ protected:
|
|||
virtual void keydown_event(GKeyEvent&) override;
|
||||
virtual void did_update_selection() override;
|
||||
virtual void did_update_model() override;
|
||||
virtual void context_menu_event(GContextMenuEvent&) override;
|
||||
|
||||
private:
|
||||
virtual GModelIndex index_at_event_position(const Point&, bool& is_toggle) const override;
|
||||
|
|
Loading…
Add table
Reference in a new issue