Skip to content

Commit

Permalink
Undo/redo improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaex committed Jan 6, 2024
1 parent d6cb6d9 commit 75734e1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ShareX.ScreenCaptureLib/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ShareX.ScreenCaptureLib/Properties/Resources.pt-BR.resx
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ Você gostaria de fechar o editor de imagens?</value>
</data>
<data name="RegionCaptureForm_SaveChangesBeforeClosingEditor" xml:space="preserve">
<value>Existem alterações não salvas.

Deseja salvar as alterações antes de fechar o editor?</value>
</data>
</root>
3 changes: 2 additions & 1 deletion ShareX.ScreenCaptureLib/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,8 @@ Would you like to close image editor?</value>
</data>
<data name="RegionCaptureForm_SaveChangesBeforeClosingEditor" xml:space="preserve">
<value>There are unsaved changes.
Would you like to save the changes before closing the editor?</value>

Would you like to save the changes before closing the image editor?</value>
</data>
<data name="arrow_circle_315" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\arrow-circle-315.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
Expand Down
5 changes: 5 additions & 0 deletions ShareX.ScreenCaptureLib/Shapes/ShapeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,11 @@ internal void UpdateObjects(ImageEditorControl[] objects, PointF mousePosition)
{
if (InputManager.IsMousePressed(MouseButtons.Left))
{
if (obj is ResizeNode)
{
history.CreateShapesMemento();
}

obj.OnMouseDown(mousePosition.Round());
}

Expand Down
3 changes: 2 additions & 1 deletion ShareX/Tools/OCR/OCRForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,10 @@ private void btnOpenServiceLink_Click(object sender, EventArgs e)
if (!string.IsNullOrEmpty(Result) && cbServices.SelectedItem is ServiceLink serviceLink)
{
serviceLink.OpenLink(Result);

if (Options.CloseWindowAfterOpeningServiceLink)
{
this.Close();
Close();
}
}
}
Expand Down

0 comments on commit 75734e1

Please sign in to comment.