mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-01 12:41:24 +12:00
Limit auto select tool selection to drawing tools and added special logic to switch back after crop tool completion
This commit is contained in:
parent
fa89e16d4d
commit
3b413d0110
|
@ -140,7 +140,7 @@ public virtual void ShowNodes()
|
|||
Manager.NodesVisible = true;
|
||||
}
|
||||
|
||||
public void Remove()
|
||||
public virtual void Remove()
|
||||
{
|
||||
Manager.DeleteShape(this);
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ public ShapeType CurrentTool
|
|||
{
|
||||
return currentTool;
|
||||
}
|
||||
private set
|
||||
set
|
||||
{
|
||||
if (currentTool == value) return;
|
||||
|
||||
|
@ -879,7 +879,7 @@ private void EndRegionSelection()
|
|||
|
||||
SelectCurrentShape();
|
||||
|
||||
if (Options.SwitchToSelectionToolAfterDrawing)
|
||||
if (Options.SwitchToSelectionToolAfterDrawing && (shape.ShapeCategory == ShapeCategory.Drawing || shape.ShapeCategory == ShapeCategory.Effect))
|
||||
{
|
||||
CurrentTool = ShapeType.ToolSelect;
|
||||
}
|
||||
|
|
|
@ -111,6 +111,15 @@ private void CancelButton_MousePressed(object sender, MouseEventArgs e)
|
|||
Remove();
|
||||
}
|
||||
|
||||
public override void Remove()
|
||||
{
|
||||
base.Remove();
|
||||
if (Options.SwitchToSelectionToolAfterDrawing)
|
||||
{
|
||||
Manager.CurrentTool = ShapeType.ToolSelect;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
base.Dispose();
|
||||
|
|
Loading…
Reference in a new issue