forked from 1b-agent/opencadstudio-upstream
feat(properties): make the Hyperlink field editable
The General-group Hyperlink row becomes an editable text field; committing a value writes the standard PE_URL XDATA record (an empty value clears it). Adds scene::view::dispatch::set_common_xdata, which rebuilds an entity's XDATA to replace or remove a single application record — ExtendedData only appends, so a plain add_record would leave a stale duplicate the reader would pick first. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
1b037a68aa
commit
984fa79189
3 files changed
+43
-1
No files matched your search
@@ -1460,6 +1460,20 @@ pub(super) fn on_tab_close(&mut self, idx: usize) -> Task<Message> {
|
||||
entity, field, &val,
|
||||
);
|
||||
}
|
||||
"hyperlink" => {
|
||||
// Stored in the standard PE_URL XDATA
|
||||
// record; an empty value clears it.
|
||||
let vals = if val.trim().is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(vec![acadrust::xdata::XDataValue::String(
|
||||
val.clone(),
|
||||
)])
|
||||
};
|
||||
crate::scene::view::dispatch::set_common_xdata(
|
||||
entity, "PE_URL", vals,
|
||||
);
|
||||
}
|
||||
_ => {
|
||||
crate::scene::view::dispatch::apply_geom_prop(
|
||||
entity, field, &val,
|
||||
|
||||
Reference in new issue
Block a user