n_children is count of toplevel nodes
Change-Id: I38302045bfe096781ce9c59c6f2dbe0a7625efda Reviewed-on: https://gerrit.libreoffice.org/70453 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -732,15 +732,18 @@ public:
|
|||||||
void select_all() { unselect(-1); }
|
void select_all() { unselect(-1); }
|
||||||
void unselect_all() { select(-1); }
|
void unselect_all() { select(-1); }
|
||||||
|
|
||||||
|
// return the number of toplevel nodes
|
||||||
virtual int n_children() const = 0;
|
virtual int n_children() const = 0;
|
||||||
|
|
||||||
virtual void make_sorted() = 0;
|
virtual void make_sorted() = 0;
|
||||||
virtual void make_unsorted() = 0;
|
virtual void make_unsorted() = 0;
|
||||||
virtual bool get_sort_order() const = 0;
|
virtual bool get_sort_order() const = 0;
|
||||||
virtual void set_sort_order(bool bAscending) = 0;
|
virtual void set_sort_order(bool bAscending) = 0;
|
||||||
|
|
||||||
// TRUE ascending, FALSE, descending, INDET, neither (off)
|
// TRUE ascending, FALSE, descending, INDET, neither (off)
|
||||||
virtual void set_sort_indicator(TriState eState, int nColumn = -1) = 0;
|
virtual void set_sort_indicator(TriState eState, int nColumn = -1) = 0;
|
||||||
virtual TriState get_sort_indicator(int nColumn = -1) const = 0;
|
virtual TriState get_sort_indicator(int nColumn = -1) const = 0;
|
||||||
|
|
||||||
virtual int get_sort_column() const = 0;
|
virtual int get_sort_column() const = 0;
|
||||||
virtual void set_sort_column(int nColumn) = 0;
|
virtual void set_sort_column(int nColumn) = 0;
|
||||||
|
|
||||||
|
@@ -2558,7 +2558,7 @@ public:
|
|||||||
|
|
||||||
virtual int n_children() const override
|
virtual int n_children() const override
|
||||||
{
|
{
|
||||||
return m_xTreeView->GetEntryCount();
|
return m_xTreeView->GetModel()->GetChildList(nullptr).size();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void select(int pos) override
|
virtual void select(int pos) override
|
||||||
|
Reference in New Issue
Block a user