[Gui] Issue #3923 - Arbitrary Tree item ordering + tests

This commit is contained in:
Tomas Pavlicek
2021-10-26 19:09:34 +02:00
parent ea355833fd
commit 345dcd5252
16 changed files with 826 additions and 22 deletions

View File

@@ -64,6 +64,9 @@ public:
App::PropertyEnumeration OnTopWhenSelected;
App::PropertyEnumeration SelectionStyle;
// Hidden properties
App::PropertyInteger TreeRank;
virtual void attach(App::DocumentObject *pcObject);
virtual void reattach(App::DocumentObject *);
virtual void update(const App::Property*) override;
@@ -155,6 +158,8 @@ public:
void setShowable(bool enable);
bool isShowable() const;
virtual bool allowTreeOrderSwap(const App::DocumentObject *child1, const App::DocumentObject *child2) const;
protected:
/*! Get the active mdi view of the document this view provider is part of.
@note The returned mdi view doesn't need to be a 3d view but can be e.g.
@@ -207,6 +212,8 @@ protected:
App::DocumentObject *pcObject;
Gui::Document* pcDocument;
static int lastTreeRank;
private:
bool _Showable = true;