+ Interface for selection of Python view providers
This commit is contained in:
@@ -48,7 +48,9 @@ public:
|
||||
// Returns the icon
|
||||
QIcon getIcon() const;
|
||||
std::vector<App::DocumentObject*> claimChildren(const std::vector<App::DocumentObject*>&) const;
|
||||
bool useNewSelectionModel() const;
|
||||
std::string getElement(const SoDetail *det) const;
|
||||
SoDetail* getDetail(const char*) const;
|
||||
std::vector<Base::Vector3d> getSelectionShape(const char* Element) const;
|
||||
bool setEdit(int ModNum);
|
||||
bool unsetEdit(int ModNum);
|
||||
@@ -124,11 +126,18 @@ public:
|
||||
/** @name Selection handling */
|
||||
//@{
|
||||
virtual bool useNewSelectionModel() const {
|
||||
return ViewProviderT::useNewSelectionModel();
|
||||
return imp->useNewSelectionModel();
|
||||
}
|
||||
virtual std::string getElement(const SoDetail *det) const {
|
||||
std::string name = imp->getElement(det);
|
||||
if (!name.empty()) return name;
|
||||
return ViewProviderT::getElement(det);
|
||||
}
|
||||
virtual SoDetail* getDetail(const char* name) const {
|
||||
SoDetail* det = imp->getDetail(name);
|
||||
if (det) return det;
|
||||
return ViewProviderT::getDetail(name);
|
||||
}
|
||||
virtual std::vector<Base::Vector3d> getSelectionShape(const char* Element) const {
|
||||
return ViewProviderT::getSelectionShape(Element);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user