Sketcher: Do not autoscale if there are blocked geometries
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user