mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
BUG-1682: This fixes the tail location while drawing, and also reduces the drawing bounds to that which it should be. (includes a few cleanups)
This commit is contained in:
parent
4fe74a240b
commit
49193644a8
6 changed files with 340 additions and 289 deletions
|
@ -222,11 +222,11 @@ namespace Greenshot.Drawing {
|
|||
|
||||
[NonSerialized]
|
||||
// will store current bounds of this DrawableContainer before starting a resize
|
||||
private Rectangle _boundsBeforeResize = Rectangle.Empty;
|
||||
protected Rectangle _boundsBeforeResize = Rectangle.Empty;
|
||||
|
||||
[NonSerialized]
|
||||
// "workbench" rectangle - used for calculating bounds during resizing (to be applied to this DrawableContainer afterwards)
|
||||
private RectangleF _boundsAfterResize = RectangleF.Empty;
|
||||
protected RectangleF _boundsAfterResize = RectangleF.Empty;
|
||||
|
||||
public Rectangle Bounds {
|
||||
get { return GuiRectangle.GetGuiRectangle(Left, Top, Width, Height); }
|
||||
|
@ -449,6 +449,7 @@ namespace Greenshot.Drawing {
|
|||
}
|
||||
|
||||
private void GripperMouseMove(object sender, MouseEventArgs e) {
|
||||
Invalidate();
|
||||
Gripper originatingGripper = (Gripper)sender;
|
||||
int absX = originatingGripper.Left + e.X;
|
||||
int absY = originatingGripper.Top + e.Y;
|
||||
|
@ -463,7 +464,6 @@ namespace Greenshot.Drawing {
|
|||
MakeBoundsChangeUndoable(false);
|
||||
}
|
||||
|
||||
Invalidate();
|
||||
SuspendLayout();
|
||||
|
||||
// reset "workbench" rectangle to current bounds
|
||||
|
@ -479,8 +479,8 @@ namespace Greenshot.Drawing {
|
|||
ApplyBounds(_boundsAfterResize);
|
||||
|
||||
ResumeLayout();
|
||||
Invalidate();
|
||||
}
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
public bool hasFilters {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue