Sketcher: Do not autoscale if there are blocked geometries

This commit is contained in:
theo-vt
2025-12-12 07:33:32 -05:00
committed by Chris Hennes
parent fc93004c89
commit 29eeab3624
3 changed files with 12 additions and 1 deletions

View File

@@ -418,10 +418,12 @@ void EditDatumDialog::performAutoScale(double newDatum)
// if there are external geometries, it is safe to assume that the sketch
// was drawn with these geometries as scale references (use <= 2 because
// the sketch axis are considered as external geometries)
// if the sketch has blocked geometries, it is considered a scale indicator
// and autoscale is not performed either
if ((autoScaleMode == static_cast<int>(SketcherGui::AutoScaleMode::Always)
|| (autoScaleMode == static_cast<int>(SketcherGui::AutoScaleMode::WhenNoScaleFeatureIsVisible)
&& !hasVisualFeature(sketch, nullptr, Gui::Application::Instance->activeDocument())))
&& sketch->getExternalGeometryCount() <= 2) {
&& sketch->getExternalGeometryCount() <= 2 && !sketch->hasBlockConstraint()) {
try {
// Handle the case where multiple datum constraints are present but only one is scale
// defining e.g. a bunch of angle constraints and a single length constraint