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
85b1c42cd1
commit
8b94d49a3c
@@ -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