Transfer region no longer copy

This commit is contained in:
Emilia Allison 2023-10-24 16:21:30 -04:00
parent 6aee3ded2c
commit 9a3a10c8b4
Signed by: emilia
GPG Key ID: 7A3F8997BFE894E0
2 changed files with 3 additions and 3 deletions

View File

@ -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| {

View File

@ -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.