feat(properties): refine quick properties

- Keep the floating panel near the selection and inside the viewport
- Persist the toggle and hide the panel without a selection
- Show only Material in 3D Visualization
This commit is contained in:
Hakan Seven 2026-08-04 17:32:06 +03:00
commit c9550b48f9
9 changed files with 75 additions and 57 deletions

View file

@ -3216,6 +3216,11 @@ impl OpenCADStudio {
}
Message::ToggleQuickProperties => {
self.quick_properties ^= true;
if self.quick_properties {
self.quick_properties_anchor =
self.tabs[self.active_tab].last_cursor_screen;
}
self.save_config();
Task::none()
}
Message::ToggleSelectionCycling => {
@ -3226,12 +3231,19 @@ impl OpenCADStudio {
}
Message::CycleSelect(handle) => {
// Add the picked object to the current selection (accumulate).
let quick_properties_anchor = self
.cycle_candidates
.as_ref()
.map(|(point, _)| *point);
self.cycle_candidates = None;
let i = self.active_tab;
self.tabs[i].scene.set_hover_highlight(None);
self.tabs[i].scene.select_entity(handle, false);
self.tabs[i].scene.expand_selection_for_groups(&[handle]);
self.refresh_properties();
if let Some(point) = quick_properties_anchor {
self.quick_properties_anchor = point;
}
Task::none()
}
Message::CycleHover(handle) => {