Transfer region no longer copy
This commit is contained in:
parent
6aee3ded2c
commit
9a3a10c8b4
|
@ -192,7 +192,7 @@ pub fn TransferMenu() -> Html {
|
||||||
let new_transfer = Transfer::new(
|
let new_transfer = Transfer::new(
|
||||||
spi.clone(),
|
spi.clone(),
|
||||||
dpi.clone(),
|
dpi.clone(),
|
||||||
ct_state.transfer.transfer_region,
|
ct_state.transfer.transfer_region.clone(),
|
||||||
ct_state.transfer.name.clone(),
|
ct_state.transfer.name.clone(),
|
||||||
);
|
);
|
||||||
main_dispatch.reduce_mut(|state| {
|
main_dispatch.reduce_mut(|state| {
|
||||||
|
|
|
@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use super::plate::Plate;
|
use super::plate::Plate;
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Debug)]
|
#[derive(Clone, PartialEq, Eq, Serialize, Deserialize, Debug)]
|
||||||
pub enum Region {
|
pub enum Region {
|
||||||
Rect((u8, u8), (u8, u8)),
|
Rect((u8, u8), (u8, u8)),
|
||||||
Point((u8, u8)),
|
Point((u8, u8)),
|
||||||
|
@ -24,7 +24,7 @@ impl TryFrom<Region> for ((u8, u8), (u8, u8)) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, Clone, Copy, Serialize, Deserialize, Debug)]
|
#[derive(PartialEq, Eq, Clone, Serialize, Deserialize, Debug)]
|
||||||
pub struct TransferRegion {
|
pub struct TransferRegion {
|
||||||
pub source_plate: Plate,
|
pub source_plate: Plate,
|
||||||
pub source_region: Region, // Even if it is just a point, we don't want corners.
|
pub source_region: Region, // Even if it is just a point, we don't want corners.
|
||||||
|
|
Loading…
Reference in New Issue