forked from 1b-agent/opencadstudio-upstream
REFEDIT: a DWF underlay's page is not faded outside the working set
During in-place reference editing everything outside the working set fades by XFADECTL. A DWF underlay's page now stays as it is, like a raster image or a PDF page, and only its frame fades; a DGN underlay's content keeps fading with the rest. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
93d92b2a51
commit
4840bd70ac
1 file changed
+13
-2
+13
-2
@@ -4547,8 +4547,19 @@ impl Scene {
|
||||
return;
|
||||
};
|
||||
for w in wires.iter_mut() {
|
||||
let keep_bright =
|
||||
Self::handle_from_wire_name(&w.name).is_some_and(|h| keep.contains(&h));
|
||||
let handle = Self::handle_from_wire_name(&w.name);
|
||||
// A DWF underlay's page stays as it is outside the working set,
|
||||
// like an image or a PDF page; only its frame fades. A DGN
|
||||
// underlay's content fades with everything else.
|
||||
let dwf_page = w.is_display_only()
|
||||
&& handle.is_some_and(|h| {
|
||||
matches!(
|
||||
self.document.get_entity(h),
|
||||
Some(EntityType::Underlay(u))
|
||||
if u.underlay_type == codec::entities::UnderlayType::Dwf
|
||||
)
|
||||
});
|
||||
let keep_bright = dwf_page || handle.is_some_and(|h| keep.contains(&h));
|
||||
if !keep_bright {
|
||||
w.color = crate::scene::cache::block_cache::refedit_fade(w.color, bg);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user