mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Added a fix for the cursor, it won't be on the surface if it's outside the captured range. This fixes the "issue" where the undo & delete buttons are active but nothing is visible.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2442 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
647d2a098c
commit
fa091c0480
1 changed files with 10 additions and 4 deletions
|
@ -416,13 +416,19 @@ namespace Greenshot.Drawing {
|
|||
/// </summary>
|
||||
/// <param name="capture"></param>
|
||||
public Surface(ICapture capture) : this(capture.Image) {
|
||||
// check if cursor is captured, and visible
|
||||
if (capture.Cursor != null && capture.CursorVisible) {
|
||||
Rectangle cursorRect = new Rectangle(capture.CursorLocation, capture.Cursor.Size);
|
||||
Rectangle captureRect = new Rectangle(Point.Empty, capture.Image.Size);
|
||||
// check if cursor is on the capture, otherwise we leave it out.
|
||||
if (cursorRect.IntersectsWith(captureRect)) {
|
||||
cursorContainer = AddIconContainer(capture.Cursor, capture.CursorLocation.X, capture.CursorLocation.Y);
|
||||
SelectElement(cursorContainer);
|
||||
}
|
||||
}
|
||||
// Make sure the image is NOT disposed, we took the reference directly into ourselves
|
||||
((Capture)capture).NullImage();
|
||||
|
||||
if (capture.Cursor != null && capture.CursorVisible) {
|
||||
cursorContainer = AddIconContainer(capture.Cursor, capture.CursorLocation.X, capture.CursorLocation.Y);
|
||||
SelectElement(cursorContainer);
|
||||
}
|
||||
captureDetails = capture.CaptureDetails;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue