From cb9bc5f8db300ef0cfbc6fba142a58313cba39ce Mon Sep 17 00:00:00 2001 From: Piyush Mishra Date: Fri, 14 Jan 2022 19:42:13 +0530 Subject: [PATCH] Fix: quotes was getting cleaned on unsaved crop --- src/draw_thread.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/draw_thread.rs b/src/draw_thread.rs index 34e2507..68d1125 100644 --- a/src/draw_thread.rs +++ b/src/draw_thread.rs @@ -160,8 +160,6 @@ fn load_image( *container = Some(ImageContainer::new(&file, Arc::clone(properties))); if let Some(cont) = container { - quote.set_value(""); - let file = Path::new(&file); let conf = file.with_extension("conf"); @@ -207,7 +205,10 @@ fn load_image( if use_defaults { let mut prop = properties.write().unwrap(); - prop.quote = "".to_owned(); + if crop.is_none() { + quote.set_value(""); + prop.quote = "".to_owned(); + } quote_position.set_range(0.0, prop.original_dimension.1); quote_position.set_value(prop.quote_position); tag_position.set_range(0.0, prop.original_dimension.1);