fix(matchprop): complete property matching

This commit is contained in:
Hakan Seven committed 2026-07-28 19:53:39 +03:00
1 parent 99dbc8254d
commit a36e0d7fdc
5 files changed
+572 -41

No files matched your search

+16
View File
@@ -18,6 +18,7 @@ use glam::DVec3;
use crate::command::{CadCommand, CmdResult};
use crate::scene::model::wire_model::WireModel;
use crate::scene::Scene;
pub struct MatchPropCommand {
/// Source handle; NULL until phase 1 is complete.
@@ -53,6 +54,21 @@ impl CadCommand for MatchPropCommand {
!self.phase1_done()
}
fn entity_pick_includes_fills(&self) -> bool {
!self.phase1_done()
}
fn entity_pick_highlights_hover(&self) -> bool {
!self.phase1_done()
}
fn entity_pick_acquire_previews(&self, scene: &Scene, handle: Handle) -> Vec<WireModel> {
if self.phase1_done() || handle.is_null() {
return vec![];
}
scene.fill_hover_preview_wires(handle)
}
fn on_entity_pick(&mut self, handle: Handle, _pt: DVec3) -> CmdResult {
if handle.is_null() {
return CmdResult::NeedPoint; // nothing hit, keep waiting