Merge pull request #745 from gianlucafiore/fix/dwgunits-annotation-scales

Fix viewport and annotation scales for drawing units
This commit is contained in:
gianlucafiore authored and GitHub committed 2026-08-11 22:48:27 -03:00
commit b8b66163d6
4 files changed
+125 -42

No files matched your search

+22
View File
@@ -876,6 +876,28 @@ impl OpenCADStudio {
}
reframed += 1;
}
// Keep the active model-space annotation scale in sync as well.
// annotation_scale is drawing/paper, while CANNOSCALEVALUE stores
// the reciprocal paper/drawing factor.
if self.tabs[i].scene.annotation_scale.abs() > 1.0e-12 {
self.tabs[i].scene.annotation_scale *= factor as f32;
}
if self.tabs[i]
.scene
.document
.header
.annotation_scale_value
.abs()
> 1.0e-12
{
self.tabs[i]
.scene
.document
.header
.annotation_scale_value /= factor;
}
// Sizes the drawing keeps as settings rather than as geometry: dash
// lengths, default heights and widths, the radii the fillet and chamfer
// commands start from. They are all lengths in the unit that just