Limit auto select tool selection to drawing tools and added special logic to switch back after crop tool completion

This commit is contained in:
Daniel Kuschny 2019-04-13 14:21:48 +02:00
parent fa89e16d4d
commit 3b413d0110
3 changed files with 12 additions and 3 deletions

View file

@ -140,7 +140,7 @@ public virtual void ShowNodes()
Manager.NodesVisible = true;
}
public void Remove()
public virtual void Remove()
{
Manager.DeleteShape(this);
}

View file

@ -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;
}

View file

@ -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();