Fixing Bug #3531460, forgot to convert the selected rectangle to screen coordinates.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1923 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-06-15 07:04:51 +00:00
commit a50022c20d
2 changed files with 7 additions and 3 deletions

View file

@ -72,7 +72,7 @@ namespace Greenshot {
if (File.Exists( MainForm.LogFileLocation)) {
System.Diagnostics.Process.Start("\"" + MainForm.LogFileLocation + "\"");
} else {
MessageBox.Show("Greenshot can't write to logfile, otherwise it would be here: " + MainForm.LogFileLocation);
MessageBox.Show("Greenshot can't find the logfile, it should have been here: " + MainForm.LogFileLocation);
}
} catch (Exception) {
MessageBox.Show("Couldn't open the greenshot.log, it's located here: " + MainForm.LogFileLocation, "Error opening greeenshot.log", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);

View file

@ -784,8 +784,12 @@ namespace Greenshot.Helpers {
}
// Take the captureRect, this already is specified as bitmap coordinates
capture.Crop(captureRect);
// save for re-capturing later and show recapture context menu option
RuntimeConfig.LastCapturedRegion = captureRect;
// Important here is that the location needs to be offsetted back to screen coordinates!
Rectangle tmpRectangle = captureRect.Clone();
tmpRectangle.Offset(capture.ScreenBounds.Location.X, capture.ScreenBounds.Location.Y);
RuntimeConfig.LastCapturedRegion = tmpRectangle;
HandleCapture();
}
}