mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-01 12:41:24 +12:00
Removed unneeded variable, ensure shape stays selected after drawing
This commit is contained in:
parent
e3b39685a0
commit
8cb8416cd4
|
@ -72,7 +72,6 @@ public ShapeType CurrentTool
|
|||
{
|
||||
if (currentTool == value) return;
|
||||
|
||||
ShapeType previousTool = currentTool;
|
||||
currentTool = value;
|
||||
|
||||
if (Form.IsAnnotationMode)
|
||||
|
@ -96,9 +95,12 @@ public ShapeType CurrentTool
|
|||
if (CurrentShape != null)
|
||||
{
|
||||
// do not keep selection if select tool does not handle it
|
||||
if (currentTool == ShapeType.ToolSelect && !CurrentShape.IsHandledBySelectTool)
|
||||
if (currentTool == ShapeType.ToolSelect)
|
||||
{
|
||||
DeselectCurrentShape();
|
||||
if (!CurrentShape.IsHandledBySelectTool)
|
||||
{
|
||||
DeselectCurrentShape();
|
||||
}
|
||||
}
|
||||
// do not keep selection if we switch away from a tool and the selected shape does not match the new type
|
||||
else if (CurrentShape.ShapeType != currentTool)
|
||||
|
|
Loading…
Reference in a new issue