Fix space tree refresh

Stop space hierarchy being duplicated. This is done by making sure old jobs are cleared at all resets and to make doubly sure when a child is inserted it overrides itself so there can never be duplicates
This commit is contained in:
James Graham
2024-03-08 18:36:43 +00:00
parent 4d62ad1938
commit 2a6e63595e
3 changed files with 32 additions and 14 deletions

View File

@@ -35,6 +35,8 @@ public:
Quotient::StateEvents childStates = {});
~SpaceTreeItem();
bool operator==(const SpaceTreeItem &other) const;
/**
* @brief Return the child at the given row number.
*
@@ -48,9 +50,9 @@ public:
int childCount() const;
/**
* @brief Insert the given child at the given row number.
* @brief Insert the given child.
*/
bool insertChild(int row, SpaceTreeItem *newChild);
bool insertChild(SpaceTreeItem *newChild);
/**
* @brief Remove the child at the given row number.