Compare commits
2 commits
3854fe893d
...
85113a760f
Author | SHA1 | Date | |
---|---|---|---|
![]() |
85113a760f | ||
![]() |
1ef2081c47 |
1 changed files with 12 additions and 4 deletions
16
src/main.rs
16
src/main.rs
|
@ -1230,8 +1230,6 @@ fn laser_mouse_moved(app: &App, model: &mut GuiModel, pos: Point2) {
|
||||||
// config.filters.clip.
|
// config.filters.clip.
|
||||||
let point = config.filters.homography.move_dac_point(*map_idx, [laser_x, laser_y]);
|
let point = config.filters.homography.move_dac_point(*map_idx, [laser_x, laser_y]);
|
||||||
|
|
||||||
// 3. update config in laser stream threat
|
|
||||||
|
|
||||||
// 3. update config in laser stream threat
|
// 3. update config in laser stream threat
|
||||||
let homography = config.filters.homography.clone();
|
let homography = config.filters.homography.clone();
|
||||||
|
|
||||||
|
@ -1383,11 +1381,11 @@ fn map_mouse_moved(_app: &App, model: &mut GuiModel, pos: Point2) {
|
||||||
|
|
||||||
// 3. propagate to laser stream threat
|
// 3. propagate to laser stream threat
|
||||||
let selected_laser_stream = model.laser_streams.get(&dac_id);
|
let selected_laser_stream = model.laser_streams.get(&dac_id);
|
||||||
let mat = config.filters.homography.homography_matrix.clone();
|
let homography = config.filters.homography.clone();
|
||||||
|
|
||||||
if let Some(stream) = selected_laser_stream {
|
if let Some(stream) = selected_laser_stream {
|
||||||
stream.send(move |laser_model: &mut LaserModel| {
|
stream.send(move |laser_model: &mut LaserModel| {
|
||||||
laser_model.config.filters.homography.homography_matrix = mat;
|
laser_model.config.filters.homography = homography;
|
||||||
}).unwrap();
|
}).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1489,6 +1487,16 @@ fn map_mouse_pressed(app: &App, model: &mut GuiModel, button: MouseButton) {
|
||||||
model.canvas_dragging_homography = Some(index);
|
model.canvas_dragging_homography = Some(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// propagate to laser dac streamer
|
||||||
|
let selected_laser_stream = model.laser_streams.get(&dac_id);
|
||||||
|
let homography = config.filters.homography.clone();
|
||||||
|
|
||||||
|
if let Some(stream) = selected_laser_stream {
|
||||||
|
stream.send(move |laser_model: &mut LaserModel| {
|
||||||
|
laser_model.config.filters.homography = homography;
|
||||||
|
}).unwrap();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue