summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/ModelIndex.h
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2021-05-31 23:47:01 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-01 08:22:51 +0200
commit7a4445a1fe4a53746444d8c128a08ffbf8404493 (patch)
tree565f883710691092722dde9a2df7a6c9780d07a3 /Userland/Libraries/LibGUI/ModelIndex.h
parent67a5e9f0184eac51a7451f540845e49dfdc0b34a (diff)
downloadserenity-7a4445a1fe4a53746444d8c128a08ffbf8404493.zip
LibGUI/TreeView: Select parent on collapse
When collapsing a tree that contains the current selection, the parent node becomes selected instead.
Diffstat (limited to 'Userland/Libraries/LibGUI/ModelIndex.h')
-rw-r--r--Userland/Libraries/LibGUI/ModelIndex.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/ModelIndex.h b/Userland/Libraries/LibGUI/ModelIndex.h
index a637471b1e..92d040c704 100644
--- a/Userland/Libraries/LibGUI/ModelIndex.h
+++ b/Userland/Libraries/LibGUI/ModelIndex.h
@@ -26,6 +26,7 @@ public:
void* internal_data() const { return m_internal_data; }
ModelIndex parent() const;
+ bool is_parent_of(const ModelIndex&) const;
bool operator==(const ModelIndex& other) const
{