diff --git a/src/Gui/ViewProviderGeometryObject.cpp b/src/Gui/ViewProviderGeometryObject.cpp index b9211bb620..23e7937950 100644 --- a/src/Gui/ViewProviderGeometryObject.cpp +++ b/src/Gui/ViewProviderGeometryObject.cpp @@ -185,12 +185,21 @@ void ViewProviderGeometryObject::attach(App::DocumentObject *pcObj) void ViewProviderGeometryObject::updateData(const App::Property* prop) { if (prop->isDerivedFrom(App::PropertyComplexGeoData::getClassTypeId())) { - // Note: When the placement of non-parametric objects changes there is currently no update - // of the bounding box information. Base::BoundBox3d box = static_cast(prop)->getBoundingBox(); pcBoundingBox->minBounds.setValue(box.MinX, box.MinY, box.MinZ); pcBoundingBox->maxBounds.setValue(box.MaxX, box.MaxY, box.MaxZ); } + else if (prop->isDerivedFrom(App::PropertyPlacement::getClassTypeId())) { + App::GeoFeature* geometry = dynamic_cast(getObject()); + if (geometry && prop == &geometry->Placement) { + const App::PropertyComplexGeoData* data = geometry->getPropertyOfGeometry(); + if (data) { + Base::BoundBox3d box = data->getBoundingBox(); + pcBoundingBox->minBounds.setValue(box.MinX, box.MinY, box.MinZ); + pcBoundingBox->maxBounds.setValue(box.MaxX, box.MaxY, box.MaxZ); + } + } + } ViewProviderDragger::updateData(prop); }