diff options
author | Andreas Kling <kling@serenityos.org> | 2020-09-16 15:28:16 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-09-16 16:37:28 +0200 |
commit | 95b6c984350f150b0d34fdc0ad726c9593b68a84 (patch) | |
tree | 3977ab0bac6ed65921fc5846fbb008dfc523d68f /Libraries/LibGUI/TreeView.h | |
parent | d1445cee6db6c16f9bd085986df16d88e9bda3f6 (diff) | |
download | serenity-95b6c984350f150b0d34fdc0ad726c9593b68a84.zip |
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.
Diffstat (limited to 'Libraries/LibGUI/TreeView.h')
-rw-r--r-- | Libraries/LibGUI/TreeView.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibGUI/TreeView.h b/Libraries/LibGUI/TreeView.h index 4e4e39fb44..3b3f049370 100644 --- a/Libraries/LibGUI/TreeView.h +++ b/Libraries/LibGUI/TreeView.h @@ -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; |