forked from 1b-agent/opencadstudio-upstream
fix(annotative): make scale-manager rename and edits actually persist
Double-click rename did nothing and ratio edits were lost when switching scales — and on drawings saved by other programs nothing could be edited at all. - Fallback scales were virtual (no Scale objects), so edit/rename no-oped; materialize the standard set into real staged objects when the manager opens, reverted on close unless applied. - On third-party DWGs the mutators walked the root named-objects dict -> ACAD_SCALELIST, which can be unreachable, and matched dictionary keys that are internal ids (*A1, A0) rather than scale names. Locate the scale-list dict robustly and match scales by object name + handle. - Rename rows inline via double-click; repair a dangling current-scale header pointer on staged rollback. - Stage text/mleader style-manager edits on switch so they persist like the scale manager. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
cd766bc1f5
commit
70225de11f
8 files changed
+414
-190
No files matched your search
@@ -91,7 +91,7 @@ fn scale_row(label: String, active: bool, msg: Message) -> Element<'static, Mess
|
||||
}
|
||||
|
||||
fn manage_row() -> Element<'static, Message> {
|
||||
button(text("Manage scales...").size(11).color(CHECK_COLOR))
|
||||
button(text("Manage...").size(11).color(CHECK_COLOR))
|
||||
.on_press(Message::ScaleManagerOpen)
|
||||
.style(|_: &Theme, status| button::Style {
|
||||
background: Some(Background::Color(match status {
|
||||
|
||||
Reference in new issue
Block a user