mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-04 14:11:38 +12:00
fixed #2963: Make sure to set initial size on shape paste so proportional resizing can work
This commit is contained in:
parent
69fd80dd76
commit
fd5bdaa9ea
|
@ -316,7 +316,7 @@ public virtual void OnNodeUpdate()
|
||||||
StartPosition = startPos;
|
StartPosition = startPos;
|
||||||
EndPosition = endPos;
|
EndPosition = endPos;
|
||||||
|
|
||||||
if (Manager.IsProportionalResizing)
|
if (Manager.IsProportionalResizing && !InitialSize.IsEmpty)
|
||||||
{
|
{
|
||||||
switch (nodePosition)
|
switch (nodePosition)
|
||||||
{
|
{
|
||||||
|
|
|
@ -757,7 +757,6 @@ private void EndRegionSelection()
|
||||||
if (wasCreating)
|
if (wasCreating)
|
||||||
{
|
{
|
||||||
shape.OnCreated();
|
shape.OnCreated();
|
||||||
shape.InitialSize = shape.Rectangle.Size;
|
|
||||||
|
|
||||||
OnShapeCreated(shape);
|
OnShapeCreated(shape);
|
||||||
}
|
}
|
||||||
|
@ -1313,6 +1312,7 @@ private void PasteFromClipboard()
|
||||||
Point pos = InputManager.ClientMousePosition;
|
Point pos = InputManager.ClientMousePosition;
|
||||||
shape.Rectangle = new Rectangle(pos.X, pos.Y, 1, 1);
|
shape.Rectangle = new Rectangle(pos.X, pos.Y, 1, 1);
|
||||||
shape.SetImage(img, true);
|
shape.SetImage(img, true);
|
||||||
|
shape.OnCreated();
|
||||||
AddShape(shape);
|
AddShape(shape);
|
||||||
SelectCurrentShape();
|
SelectCurrentShape();
|
||||||
}
|
}
|
||||||
|
@ -1329,6 +1329,7 @@ private void PasteFromClipboard()
|
||||||
shape.Rectangle = new Rectangle(pos.X, pos.Y, 1, 1);
|
shape.Rectangle = new Rectangle(pos.X, pos.Y, 1, 1);
|
||||||
shape.Text = text.Trim();
|
shape.Text = text.Trim();
|
||||||
shape.AutoSize(true);
|
shape.AutoSize(true);
|
||||||
|
shape.OnCreated();
|
||||||
AddShape(shape);
|
AddShape(shape);
|
||||||
SelectCurrentShape();
|
SelectCurrentShape();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue