PartDesign: Fix use of App::Planes to create sketches (#20453)
This commit is contained in:
@@ -4154,7 +4154,6 @@ const std::vector<DocumentObject*>& Document::getObjects() const
|
||||
return d->objectArray;
|
||||
}
|
||||
|
||||
|
||||
std::vector<DocumentObject*> Document::getObjectsOfType(const Base::Type& typeId) const
|
||||
{
|
||||
std::vector<DocumentObject*> Objects;
|
||||
@@ -4166,6 +4165,20 @@ std::vector<DocumentObject*> Document::getObjectsOfType(const Base::Type& typeId
|
||||
return Objects;
|
||||
}
|
||||
|
||||
std::vector<DocumentObject*> Document::getObjectsOfType(const std::vector<Base::Type>& types) const
|
||||
{
|
||||
std::vector<DocumentObject*> Objects;
|
||||
for (auto it : d->objectArray) {
|
||||
for (auto& typeId : types) {
|
||||
if (it->isDerivedFrom(typeId)) {
|
||||
Objects.push_back(it);
|
||||
break; // Prevent adding several times the same object.
|
||||
}
|
||||
}
|
||||
}
|
||||
return Objects;
|
||||
}
|
||||
|
||||
std::vector<DocumentObject*> Document::getObjectsWithExtension(const Base::Type& typeId,
|
||||
bool derived) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user