Path
This commit is contained in:
parent
0882b8c58e
commit
b821b04bf3
|
|
@ -168,7 +168,9 @@ impl ImageContainer {
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
);
|
);
|
||||||
|
|
||||||
if fs::write(&path_conf, serde_json::to_string(&*prop).unwrap()).is_err() {
|
let mut prop = prop.clone();
|
||||||
|
prop.path = None;
|
||||||
|
if fs::write(&path_conf, serde_json::to_string(&prop).unwrap()).is_err() {
|
||||||
dialog::message_default("Failed to save conf!");
|
dialog::message_default("Failed to save conf!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -265,7 +267,7 @@ impl ImageContainer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug)]
|
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||||
pub(crate) struct ImageProperties {
|
pub(crate) struct ImageProperties {
|
||||||
pub(crate) path: Option<PathBuf>,
|
pub(crate) path: Option<PathBuf>,
|
||||||
pub(crate) dimension: (f64, f64),
|
pub(crate) dimension: (f64, f64),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue