mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-02 18:26:27 +13: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
2 changed files with 3 additions and 2 deletions
|
@ -316,7 +316,7 @@ public virtual void OnNodeUpdate()
|
|||
StartPosition = startPos;
|
||||
EndPosition = endPos;
|
||||
|
||||
if (Manager.IsProportionalResizing)
|
||||
if (Manager.IsProportionalResizing && !InitialSize.IsEmpty)
|
||||
{
|
||||
switch (nodePosition)
|
||||
{
|
||||
|
|
|
@ -757,7 +757,6 @@ private void EndRegionSelection()
|
|||
if (wasCreating)
|
||||
{
|
||||
shape.OnCreated();
|
||||
shape.InitialSize = shape.Rectangle.Size;
|
||||
|
||||
OnShapeCreated(shape);
|
||||
}
|
||||
|
@ -1313,6 +1312,7 @@ private void PasteFromClipboard()
|
|||
Point pos = InputManager.ClientMousePosition;
|
||||
shape.Rectangle = new Rectangle(pos.X, pos.Y, 1, 1);
|
||||
shape.SetImage(img, true);
|
||||
shape.OnCreated();
|
||||
AddShape(shape);
|
||||
SelectCurrentShape();
|
||||
}
|
||||
|
@ -1329,6 +1329,7 @@ private void PasteFromClipboard()
|
|||
shape.Rectangle = new Rectangle(pos.X, pos.Y, 1, 1);
|
||||
shape.Text = text.Trim();
|
||||
shape.AutoSize(true);
|
||||
shape.OnCreated();
|
||||
AddShape(shape);
|
||||
SelectCurrentShape();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue