forked from 1b-agent/opencadstudio-upstream
REFEDIT: Edit Reference dialog and unique names for xref objects
REFEDIT opens a dialog after the pick: the nesting chain as chips with a preview of the chosen definition, all objects or picking them in the drawing, attribute definitions (offered only when the definition has them), locking objects outside the working set and unique names for an external reference's named objects. The settings are remembered. With unique names an xref's dependent layers, linetypes, text styles and blocks are checked out as $N$NAME records of their own; without, under the plain name, sharing a host record of that name. Save writes them back under the reference's names, and the records made for the session are removed when it closes. -REFEDIT uses the remembered settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
592289f4fd
commit
92a3a8ee4d
33 files changed
+1061
-22
No files matched your search
@@ -652,6 +652,9 @@ pub struct UserSettings {
|
||||
/// BLOCKNAVIGATE (default ".").
|
||||
#[serde(default = "default_block_navigate")]
|
||||
pub block_navigate: String,
|
||||
/// The Edit Reference dialog's settings.
|
||||
#[serde(default)]
|
||||
pub refedit: RefEditOptions,
|
||||
/// XFADECTL: how far objects outside the REFEDIT working set fade (0–90, default 70).
|
||||
#[serde(default = "default_xfadectl")]
|
||||
pub xfadectl: u8,
|
||||
@@ -687,6 +690,30 @@ pub struct PaletteBlockRef {
|
||||
pub drawing: bool,
|
||||
}
|
||||
|
||||
/// The Edit Reference dialog's settings, remembered between sessions: give
|
||||
/// an external reference's clashing named objects unique names, check out
|
||||
/// attribute definitions, lock what is outside the working set, pick the
|
||||
/// working set's objects in the drawing.
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(default)]
|
||||
pub struct RefEditOptions {
|
||||
pub unique_names: bool,
|
||||
pub attributes: bool,
|
||||
pub lock: bool,
|
||||
pub nested: bool,
|
||||
}
|
||||
|
||||
impl Default for RefEditOptions {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
unique_names: true,
|
||||
attributes: false,
|
||||
lock: true,
|
||||
nested: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The Blocks palette's insertion options.
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct BlockInsertOptions {
|
||||
@@ -938,6 +965,7 @@ impl Default for UserSettings {
|
||||
block_mru_list: 50,
|
||||
block_redefine_mode: 1,
|
||||
block_navigate: ".".to_string(),
|
||||
refedit: RefEditOptions::default(),
|
||||
xfadectl: 70,
|
||||
count_color: 3,
|
||||
count_error_color: 1,
|
||||
|
||||
Reference in new issue
Block a user