App/Gui: improve expression binding of PropertyEnumeration

The enumeration items are exposed through sub path '.Enum'. When
'ShowAll' is enabled in property view, this sub path is exposed as a
sub property item named 'Enum', and can be either manually edited or
bound with an expression.
This commit is contained in:
Zheng, Lei
2019-12-23 11:48:03 +08:00
committed by Chris Hennes
parent 3cc2b49ee9
commit 72ae26dfee
7 changed files with 241 additions and 77 deletions

View File

@@ -100,6 +100,7 @@ ViewProviderDocumentObject::ViewProviderDocumentObject()
ViewProviderDocumentObject::~ViewProviderDocumentObject()
{
// Make sure that the property class does not destruct our string list
DisplayMode.setContainer(nullptr);
DisplayMode.setEnums(0);
}
@@ -687,7 +688,7 @@ ViewProviderDocumentObject *ViewProviderDocumentObject::getLinkedViewProvider(
std::string ViewProviderDocumentObject::getFullName() const {
if(pcObject)
return pcObject->getFullName() + ".ViewObject";
return std::string();
return std::string("?");
}
bool ViewProviderDocumentObject::allowTreeOrderSwap(const App::DocumentObject *child1, const App::DocumentObject *child2) const