forked from 1b-agent/opencadstudio-upstream
feat(properties): the drawing's format version names its release years
The no-selection panel showed only the AC code. It now reads e.g. "AC1032 (2018+)", from the version the file was opened as. Discussion #1442 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
a4ebf8f58a
commit
7f59d8f679
1 file changed
+21
-4
+21
-4
@@ -2193,10 +2193,27 @@ impl OpenCADStudio {
|
||||
PropSection {
|
||||
title: t!("General").into_owned(),
|
||||
props: vec![
|
||||
read_only(
|
||||
t!("AC Version").as_ref(),
|
||||
doc.version.as_str().to_string(),
|
||||
),
|
||||
read_only(t!("AC Version").as_ref(), {
|
||||
use codec::DxfVersion::*;
|
||||
let version = doc.dwg_source_version.unwrap_or(doc.version);
|
||||
let release = match version {
|
||||
AC1009 => "R11/R12",
|
||||
AC1012 => "R13",
|
||||
AC1014 => "R14",
|
||||
AC1015 => "2000-2002",
|
||||
AC1018 => "2004-2006",
|
||||
AC1021 => "2007-2009",
|
||||
AC1024 => "2010-2012",
|
||||
AC1027 => "2013-2017",
|
||||
AC1032 => "2018+",
|
||||
Unknown => "",
|
||||
};
|
||||
if release.is_empty() {
|
||||
version.as_str().to_string()
|
||||
} else {
|
||||
format!("{} ({release})", version.as_str())
|
||||
}
|
||||
}),
|
||||
Property {
|
||||
label: t!("Color").into_owned(),
|
||||
field: "color",
|
||||
|
||||
Reference in new issue
Block a user