Gui: add new API ViewProviderDocumentObject::allowOverride()

This API is used to delcare if a view provider can be used as an
override for a give object.

Conflicts:
	src/App/DocumentObject.h
This commit is contained in:
Zheng, Lei
2019-09-22 21:18:54 +08:00
committed by wmayer
parent 7305343e10
commit 2df3052ecf
10 changed files with 89 additions and 103 deletions

View File

@@ -57,7 +57,6 @@ public:
bool onBeforeChangeLabel(std::string &newLabel);
void onChanged(const Property* prop);
void onDocumentRestored();
bool allowOverrideViewProviderName() const;
std::string getViewProviderName();
PyObject *getPyObject(void);
@@ -200,9 +199,6 @@ public:
}
return DocumentObject::StdReturn;
}
virtual bool allowOverrideViewProviderName() const {
return imp->allowOverrideViewProviderName();
}
virtual const char* getViewProviderNameOverride(void) const override {
viewProviderName = imp->getViewProviderName();
if(viewProviderName.size())