Gui: fix ViewProviderCoordinateSystem::claimChildren()
Until8de6382("Gui: Fix stackoverflow when loading corrupted file") a static_cast was used to obtain App::Origin object, however with introducing App::LocalCoordinateSystem this was no longer correct, although not causing any troubles as OriginFeatures moved into LocalCoordinateSystem as well. Recent use of getObject template triggered this problem, so use now correct cast to App::LocalCoordinateSystem. Fixes:19702dc("Core: Add App::LocalCoordinateSystem")
This commit is contained in:
committed by
Kacper Donat
parent
cbf32cd77b
commit
a37509956e
@@ -72,7 +72,7 @@ ViewProviderCoordinateSystem::~ViewProviderCoordinateSystem() {
|
||||
|
||||
std::vector<App::DocumentObject*> ViewProviderCoordinateSystem::claimChildren() const
|
||||
{
|
||||
auto obj = getObject<App::Origin>();
|
||||
auto obj = getObject<App::LocalCoordinateSystem>();
|
||||
std::vector<App::DocumentObject*> childs = obj->OriginFeatures.getValues();
|
||||
auto it = std::find(childs.begin(), childs.end(), obj);
|
||||
if (it != childs.end()) {
|
||||
|
||||
Reference in New Issue
Block a user