mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-03 10:46:57 +13:00
Removed unneeded variable, ensure shape stays selected after drawing
This commit is contained in:
parent
e3b39685a0
commit
8cb8416cd4
1 changed files with 5 additions and 3 deletions
|
@ -72,7 +72,6 @@ public ShapeType CurrentTool
|
||||||
{
|
{
|
||||||
if (currentTool == value) return;
|
if (currentTool == value) return;
|
||||||
|
|
||||||
ShapeType previousTool = currentTool;
|
|
||||||
currentTool = value;
|
currentTool = value;
|
||||||
|
|
||||||
if (Form.IsAnnotationMode)
|
if (Form.IsAnnotationMode)
|
||||||
|
@ -96,10 +95,13 @@ public ShapeType CurrentTool
|
||||||
if (CurrentShape != null)
|
if (CurrentShape != null)
|
||||||
{
|
{
|
||||||
// do not keep selection if select tool does not handle it
|
// do not keep selection if select tool does not handle it
|
||||||
if (currentTool == ShapeType.ToolSelect && !CurrentShape.IsHandledBySelectTool)
|
if (currentTool == ShapeType.ToolSelect)
|
||||||
|
{
|
||||||
|
if (!CurrentShape.IsHandledBySelectTool)
|
||||||
{
|
{
|
||||||
DeselectCurrentShape();
|
DeselectCurrentShape();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// do not keep selection if we switch away from a tool and the selected shape does not match the new type
|
// 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)
|
else if (CurrentShape.ShapeType != currentTool)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue