fix(color): show color book identity

This commit is contained in:
Hakan Seven committed 2026-09-01 08:44:28 +03:00
1 parent 7ea4f338f6
commit 6d6defa0ad
19 files changed
+142 -30

No files matched your search

+2
View File
@@ -128,6 +128,8 @@ impl OpenCADStudio {
if let Some(l) = self.tabs[i].scene.document.layers.get_mut(&layer_name)
{
l.color = acadrust::types::Color::from_index(idx);
l.color_name = None;
l.book_name = None;
self.push_undo_snapshot(i, "LAYER COLOR");
self.tabs[i].dirty = true;
// By-layer colour is baked into every wire on
+4
View File
@@ -616,6 +616,8 @@ impl OpenCADStudio {
}
"COLOR" => {
common.color = color_val.unwrap();
common.color_name = None;
common.color_book_handle = None;
changed += 1;
}
"TRANSPARENCY" => {
@@ -661,6 +663,8 @@ impl OpenCADStudio {
if let Some(entity) = self.tabs[i].scene.document.get_entity_mut(*handle) {
let common = entity.common_mut();
common.color = acadrust::types::Color::ByLayer;
common.color_name = None;
common.color_book_handle = None;
common.linetype = "ByLayer".to_string();
common.line_weight = acadrust::types::LineWeight::ByLayer;
changed += 1;