mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-29 17:02:05 +13:00
Rename IsAnnotated to IsModified
This commit is contained in:
parent
ec45f15922
commit
ec1d942cf5
3 changed files with 20 additions and 6 deletions
|
@ -58,7 +58,7 @@ public sealed class RegionCaptureForm : Form
|
|||
public RegionCaptureMode Mode { get; private set; }
|
||||
public bool IsEditorMode => Mode == RegionCaptureMode.Editor || Mode == RegionCaptureMode.TaskEditor;
|
||||
public bool IsAnnotationMode => Mode == RegionCaptureMode.Annotation || IsEditorMode;
|
||||
public bool IsAnnotated => ShapeManager != null && ShapeManager.IsAnnotated;
|
||||
public bool IsModified => ShapeManager != null && ShapeManager.IsModified;
|
||||
|
||||
public Point CurrentPosition { get; private set; }
|
||||
public Point PanningStrech = new Point();
|
||||
|
@ -509,7 +509,7 @@ internal bool ShowExitConfirmation()
|
|||
{
|
||||
bool result = true;
|
||||
|
||||
if (ShapeManager != null && ShapeManager.IsAnnotated)
|
||||
if (ShapeManager != null && ShapeManager.IsModified)
|
||||
{
|
||||
Pause();
|
||||
result = MessageBox.Show(this, Resources.RegionCaptureForm_ShowExitConfirmation_Text, Resources.RegionCaptureForm_ShowExitConfirmation_ShareXImageEditor,
|
||||
|
@ -1341,6 +1341,8 @@ internal void OnSaveImageRequested()
|
|||
{
|
||||
Image img = GetResultImage();
|
||||
|
||||
ShapeManager.IsModified = false;
|
||||
|
||||
if (Options.AutoCloseEditorOnTask)
|
||||
{
|
||||
CloseWindow();
|
||||
|
@ -1359,6 +1361,8 @@ internal void OnSaveImageAsRequested()
|
|||
{
|
||||
Image img = GetResultImage();
|
||||
|
||||
ShapeManager.IsModified = false;
|
||||
|
||||
if (Options.AutoCloseEditorOnTask)
|
||||
{
|
||||
CloseWindow();
|
||||
|
|
|
@ -166,9 +166,19 @@ private set
|
|||
public bool IsSnapResizing { get; private set; }
|
||||
public bool IsRenderingOutput { get; private set; }
|
||||
|
||||
private bool isAnnotated;
|
||||
private bool isModified;
|
||||
|
||||
public bool IsAnnotated => isAnnotated || DrawingShapes.Where(x => x.ShapeType != ShapeType.DrawingCursor).Count() > 0 || EffectShapes.Length > 0;
|
||||
public bool IsModified
|
||||
{
|
||||
get
|
||||
{
|
||||
return isModified || DrawingShapes.Any(x => x.ShapeType != ShapeType.DrawingCursor) || EffectShapes.Length > 0;
|
||||
}
|
||||
internal set
|
||||
{
|
||||
isModified = value;
|
||||
}
|
||||
}
|
||||
|
||||
public InputManager InputManager { get; private set; } = new InputManager();
|
||||
public List<SimpleWindowInfo> Windows { get; set; }
|
||||
|
@ -1544,7 +1554,7 @@ public void UpdateCanvas(Image img, bool centerCanvas = true)
|
|||
effect.OnMoved();
|
||||
}
|
||||
|
||||
isAnnotated = true;
|
||||
IsModified = true;
|
||||
}
|
||||
|
||||
public void CropArea(Rectangle rect)
|
||||
|
|
|
@ -99,7 +99,7 @@ protected ImageInfo ExecuteRegionCapture(TaskSettings taskSettings)
|
|||
|
||||
if (imageInfo.Image != null)
|
||||
{
|
||||
if (form.IsAnnotated)
|
||||
if (form.IsModified)
|
||||
{
|
||||
AllowAnnotation = false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue