Repository: FreeCAD/FreeCAD
File: src/Mod/Sketcher/Gui/ViewProviderSketch.cpp (C++)

Code before:

    if (prop == &getSketchObject()->InternalShape) {
        const auto& shape = getSketchObject()->InternalShape.getValue();
        setupCoinGeometry(shape,
                          pcSketchFaces,
                          Deviation.getValue(),
                          AngularDeflection.getValue());
    }

    if (prop != &getSketchObject()->Constraints) {
        signalElementsChanged();
    }
}

void ViewProviderSketch::slotSolverUpdate()
{
    if (!isInEditMode() )
        return;

    // At this point, we do not need to solve the Sketch
    // If we are adding geometry an update can be triggered before the sketch is actually
    // solved. Because a solve is mandatory to any addition (at least to update the DoF of the
    // solver), only when the solver geometry is the same in number than the sketch geometry an
    // update should trigger a redraw. This reduces even more the number of redraws per
    // insertion of geometry

    // solver information is also updated when no matching geometry, so that if a solving fails
    // this failed solving info is presented to the user
    UpdateSolverInformation();// just update the solver window with the last SketchObject
                              // solving information

    if (getSketchObject()->getExternalGeometryCount()
            + getSketchObject()->getHighestCurveIndex() + 1
        == getSolvedSketch().getGeometrySize()) {
        Gui::MDIView* mdi = Gui::Application::Instance->editDocument()->getActiveView();
        if (mdi->isDerivedFrom<Gui::View3DInventor>())
            draw(false, true);

        signalConstraintsChanged();
    }
}

void ViewProviderSketch::onChanged(const App::Property* prop)
{
    ViewProvider2DObject::onChanged(prop);

    if (prop == &VisualLayerList) {
        if (isInEditMode()) {
            // Configure and rebuild Coin SceneGraph
            editCoinManager->updateGeometryLayersConfiguration();
        }

Review comment (suggestion):
For your reference, you can use plm.toString() to print placement. 

`Base::Console().warning("Placement: %s\n", plm.toString());`

Code after:
                Deviation.getValue(),
                AngularDeflection.getValue());
    }

    if (prop != &getSketchObject()->Constraints) {
        signalElementsChanged();
    }

    // clang-format on
    // update placement changes while in edit mode
    if (isInEditMode() && prop) {
        // check if the changed property is `placement` or `attachmentoffset`
        if (strcmp(prop->getName(), "Placement") == 0
            || strcmp(prop->getName(), "AttachmentOffset") == 0) {

#ifdef FC_DEBUG
            Base::Console().warning("updating editing transform!\n");
#endif
            // recalculate the placement matrix
            Sketcher::SketchObject* sketchObj = getSketchObject();
            if (sketchObj) {
                // use globalPlacement for both attached and unattached sketches
                Base::Placement plm = sketchObj->Placement.getValue();

#ifdef FC_DEBUG
                // log what is actually being set
                Base::Console().warning(
                    "Placement: pos=(%f,%f,%f)\n",
                    plm.getPosition().x,
                    plm.getPosition().y,
                    plm.getPosition().z
                );
#endif

                // update the document's editing transform
                getDocument()->setEditingTransform(plm.toMatrix());
            }
        }
    }
    if (std::string(prop->getName()) != "ShapeMaterial") {
        // We don't want material to override the colors of sketches.
        ViewProvider2DObject::updateData(prop);
    }
    // clang-format off
}

void ViewProviderSketch::slotSolverUpdate()
{
    if (!isInEditMode() )
        return;