mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibGUI: Fix TreeView scrolling to top when clicking sub-items
This code was confusing two different versions of scroll_into_view that were getting mixed up due to member function shadowing. Adding an "override" to the subclass declaration exposed the problem. With this fixed, we no longer lose our scroll position wildly when using the mouse to select TreeView items.
This commit is contained in:
parent
d1445cee6d
commit
95b6c98435
3 changed files with 9 additions and 9 deletions
|
@ -36,7 +36,7 @@ class TreeView : public AbstractTableView {
|
|||
public:
|
||||
virtual ~TreeView() override;
|
||||
|
||||
virtual void scroll_into_view(const ModelIndex&, Gfx::Orientation);
|
||||
virtual void scroll_into_view(const ModelIndex&, bool scroll_horizontally, bool scroll_vertically) override;
|
||||
|
||||
virtual int item_count() const override;
|
||||
virtual void toggle_index(const ModelIndex&) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue