forked from 1b-agent/opencadstudio-upstream
Sheet sets: wizard paths, Turkish step names and codec pin
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1696316e1f
commit
ad5d2a8599
5 files changed
+25
-11
No files matched your search
Generated
+1
@@ -4206,6 +4206,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "opencadcodec"
|
||||
version = "0.5.5"
|
||||
source = "git+https://github.com/ramox81/cadcodec.git?rev=19aec85#19aec855cf38d1dbdaf32d09c69343fc479bfbf9"
|
||||
dependencies = [
|
||||
"ahash 0.8.12",
|
||||
"anyhow",
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ block2 = "0.5"
|
||||
objc2-foundation = { version = "0.2", features = ["NSArray", "NSURL", "NSString", "NSObject", "NSNotification", "NSThread", "NSEnumerator"] }
|
||||
|
||||
[patch."https://github.com/HakanSeven12/opencadcodec.git"]
|
||||
opencadcodec = { path = "../cadcodec-sheetset" }
|
||||
opencadcodec = { git = "https://github.com/ramox81/cadcodec.git", rev = "19aec85" }
|
||||
|
||||
[patch.crates-io]
|
||||
iced_core = { git = "https://github.com/iced-rs/iced.git", rev = "23604ff22ab0aad9e00b9327cb7b8546ed84db39" }
|
||||
|
||||
@@ -1917,7 +1917,7 @@ common =
|
||||
.allow-selection-cycling = Allow selection cycling
|
||||
.allow-writing-to-source-file = Allow writing to source file
|
||||
.break-specify-second-break-point-or-first-point = BREAK Specify second break point or [First point]:
|
||||
.begin = Begin
|
||||
.begin = Başla
|
||||
.chamferedge-select-a-base-face-edge = CHAMFEREDGE: select a base face edge.
|
||||
.cannot-delete-beyond-this = Cannot delete beyond this.
|
||||
.cell-range = Cell range
|
||||
@@ -2168,7 +2168,7 @@ common =
|
||||
.select-surfaces-to-thicken = Select surfaces to thicken:
|
||||
.selected-objects-in-current-drawing = Selected objects in current drawing
|
||||
.set-cell-styles = Set cell styles
|
||||
.sheet = Sheet
|
||||
.sheet = Sayfa
|
||||
.show-associativity = Show associativity
|
||||
.show-command-prompting-and-command-input-near-crosshairs = Show command prompting and command input near crosshairs
|
||||
.show-count-column = Show count column
|
||||
|
||||
@@ -434,6 +434,16 @@ impl OpenCADStudio {
|
||||
sync_wizard_draft(&mut w);
|
||||
let set = w.draft.sheet_set().id().to_string();
|
||||
let mut p = build_properties(&w.draft, &set, None);
|
||||
// The set is not written yet: show where it will be.
|
||||
for row in &mut p.rows {
|
||||
match row.key {
|
||||
RowKey::ReadOnly if row.label == "Sheet set data file" => {
|
||||
row.value = crate::ui::window::sheet_set::wizard_dst_path(&w)
|
||||
}
|
||||
RowKey::Folder(_) if row.value.is_empty() => row.value = w.folder.clone(),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
p.wizard = Some(Box::new(w));
|
||||
self.sheet_set.dialog = Some(SsDialog::Properties(p));
|
||||
}
|
||||
@@ -684,8 +694,8 @@ impl OpenCADStudio {
|
||||
doc.set_sheet_set_data(&SheetSetData {
|
||||
layout_handle: handle,
|
||||
layout_name: reference.name,
|
||||
sheet_dwg_name: path.clone(),
|
||||
sheet_set_file_name: db.path.clone().unwrap_or_default(),
|
||||
sheet_dwg_name: ss::native_path(&path),
|
||||
sheet_set_file_name: ss::native_path(db.path.as_deref().unwrap_or_default()),
|
||||
sheet_set_version: db.file_revision(),
|
||||
update_count: previous.update_count + 1,
|
||||
update_time: utc_stamp(),
|
||||
@@ -888,9 +898,12 @@ impl OpenCADStudio {
|
||||
let mut db = w.draft.clone();
|
||||
db.path = Some(path.clone());
|
||||
let set = db.sheet_set().id().to_string();
|
||||
if db.file_reference(&set, "NewSheetLocation").is_none() {
|
||||
db.set_file_reference(&set, "NewSheetLocation", &w.folder);
|
||||
}
|
||||
// Written again now the `.dst` has a place, so it carries its relative path.
|
||||
let location = db
|
||||
.file_reference(&set, "NewSheetLocation")
|
||||
.filter(|f| !f.is_empty())
|
||||
.unwrap_or_else(|| w.folder.clone());
|
||||
db.set_file_reference(&set, "NewSheetLocation", &location);
|
||||
// Existing drawings: a subset per folder, a sheet per chosen layout.
|
||||
if w.existing {
|
||||
for folder in &w.folders {
|
||||
@@ -1061,7 +1074,7 @@ impl OpenCADStudio {
|
||||
let Some(sheet) = db.add_sheet(&f.component, &f.number, &title, "") else {
|
||||
return Task::none();
|
||||
};
|
||||
let file = path.to_string_lossy().to_string();
|
||||
let file = ss::native_path(&path.to_string_lossy());
|
||||
db.set_layout_reference(
|
||||
&sheet,
|
||||
"Layout",
|
||||
@@ -1076,7 +1089,7 @@ impl OpenCADStudio {
|
||||
layout_handle: handle.to_lowercase(),
|
||||
layout_name,
|
||||
sheet_dwg_name: file.clone(),
|
||||
sheet_set_file_name: dst,
|
||||
sheet_set_file_name: ss::native_path(&dst),
|
||||
sheet_set_version: revision,
|
||||
update_count: 1,
|
||||
update_time: utc_stamp(),
|
||||
|
||||
@@ -754,7 +754,7 @@ fn wizard_view<'a>(w: &'a Wizard) -> Element<'a, Message> {
|
||||
|
||||
/// Where the wizard writes the `.dst`.
|
||||
pub fn wizard_dst_path(w: &Wizard) -> String {
|
||||
std::path::Path::new(&w.folder).join(format!("{}.dst", w.name.trim())).to_string_lossy().to_string()
|
||||
ss::native_path(&std::path::Path::new(&w.folder).join(format!("{}.dst", w.name.trim())).to_string_lossy())
|
||||
}
|
||||
|
||||
fn properties_view<'a>(p: &'a Properties) -> Element<'a, Message> {
|
||||
|
||||
Reference in new issue
Block a user