forked from 1b-agent/opencadstudio-upstream
fix(insert): attribute grips follow ATTMODE 2 and annotative scale
Follow-up to the block-attribute grips picked from #1386. - Movability no longer includes the invisible flag: an attribute ATTMODE 2 displays is grippable, so the grip the display-aware list shows can be dragged. The document-less grips() still skips invisible attributes, since it cannot consult ATTMODE. - The grip sits on the displayed attribute, which an annotative insert scales about its insertion point; Scene::apply_grip now unscales the dragged target the same way before the attribute stores it, so the grip no longer jumps to twice the drag at scale 2. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
1 parent
2b92fc5b09
commit
fd2062bdec
2 files changed
+48
-8
No files matched your search
@@ -1443,6 +1443,17 @@ impl Scene {
|
||||
if self.is_layer_locked(handle) {
|
||||
return;
|
||||
}
|
||||
// An attribute grip sits on the displayed (annotation-scaled)
|
||||
// attribute; the stored one is unscaled.
|
||||
let apply = match self.document.get_entity(handle) {
|
||||
Some(EntityType::Insert(insert)) => crate::entities::insert::unscale_attribute_grip(
|
||||
insert,
|
||||
self.annotation_scale,
|
||||
grip_id,
|
||||
apply,
|
||||
),
|
||||
_ => apply,
|
||||
};
|
||||
if self.apply_solid_history_grip(handle, grip_id, apply.clone()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user