diff --git a/CHANGES.txt b/CHANGES.txt index bb0b77d2..dc4c3455 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,7 @@ Bug fixes: * Fixed: keywords after atoms were not showing up (#67) * Fixed: multiple keywords that matched in the same place both showed reminder text. (#70) Now, when there are overlapping matches the longest one is used. + * Fixed: image slicing window now uses "size to fit" by default ------------------------------------------------------------------------------ -- 2.1.0, 2020-06-01 diff --git a/src/gui/image_slice_window.cpp b/src/gui/image_slice_window.cpp index b117259f..cbecad4d 100644 --- a/src/gui/image_slice_window.cpp +++ b/src/gui/image_slice_window.cpp @@ -21,7 +21,7 @@ ImageSlice::ImageSlice(const Image& source, const wxSize& target_size) : source(source), target_size(target_size) , selection(0, 0, source.GetWidth(), source.GetHeight()) , allow_outside(false), aspect_fixed(true) - , sharpen(true), sharpen_amount(25) + , sharpen(false), sharpen_amount(25) {} void ImageSlice::constrain(PreferedProperty prefer) { @@ -80,6 +80,8 @@ ImageSliceWindow::ImageSliceWindow(Window* parent, const Image& source, const wx , slice(source, target_size) , initialized(false) { + // init slice + slice.constrain(); // init controls const wxPoint defPos = wxDefaultPosition; const wxSize spinSize(80,-1); @@ -287,7 +289,7 @@ void ImageSliceWindow::updateControls() { if (slice.selection.width == slice.target_size.GetWidth() && slice.selection.height == slice.target_size.GetHeight()) { size->SetSelection(0); // original size } else if (slice.selection.x == 0 && slice.selection.width == slice.source.GetWidth() && - slice.selection.y == 0 && slice.selection.height == slice.source.GetHeight()) { + slice.selection.y == 0 && slice.selection.height == slice.source.GetHeight() && !slice.aspect_fixed) { size->SetSelection(2); // force to fit } else if (slice.selection.width <= slice.source.GetWidth() && slice.selection.height <= slice.source.GetHeight() &&