When having maintain aspect ratio deselected, the size was not correctly transported from the settings to the rescale code.

This commit is contained in:
RKrom 2014-06-26 08:49:53 +02:00
parent e801c95f84
commit 6bba9fb04f

View file

@ -104,14 +104,19 @@ namespace Greenshot.Forms {
if (!validate(sender)) {
return;
}
if (!checkbox_aspectratio.Checked) {
return;
}
TextBox textbox = sender as TextBox;
if (textbox.Text.Length == 0) {
return;
}
bool isWidth = textbox == textbox_width;
bool isWidth = textbox == textbox_width;
if (!checkbox_aspectratio.Checked) {
if (isWidth) {
newWidth = double.Parse(textbox_width.Text);
} else {
newHeight = double.Parse(textbox_height.Text);
}
return;
}
bool isPercent = false;
if (isWidth) {
isPercent = value_percent.Equals(combobox_width.SelectedItem);