mirror of
https://github.com/ShareX/ShareX.git
synced 2024-06-28 19:20:27 +12:00
fixed #4418: Make sure to use currently selected shape tool when updating shape options
This commit is contained in:
parent
ffbb4f33f0
commit
661d9e3668
|
@ -113,6 +113,26 @@ public ShapeType CurrentTool
|
|||
}
|
||||
}
|
||||
|
||||
public ShapeType CurrentShapeTool
|
||||
{
|
||||
get
|
||||
{
|
||||
ShapeType tool = CurrentTool;
|
||||
|
||||
if (tool == ShapeType.ToolSelect)
|
||||
{
|
||||
BaseShape shape = CurrentShape;
|
||||
|
||||
if (shape != null)
|
||||
{
|
||||
tool = shape.ShapeType;
|
||||
}
|
||||
}
|
||||
|
||||
return tool;
|
||||
}
|
||||
}
|
||||
|
||||
public Rectangle CurrentRectangle
|
||||
{
|
||||
get
|
||||
|
|
|
@ -324,7 +324,7 @@ internal void CreateToolbar()
|
|||
{
|
||||
Form.Pause();
|
||||
|
||||
ShapeType shapeType = CurrentTool;
|
||||
ShapeType shapeType = CurrentShapeTool;
|
||||
|
||||
Color borderColor;
|
||||
|
||||
|
@ -378,7 +378,7 @@ internal void CreateToolbar()
|
|||
{
|
||||
Form.Pause();
|
||||
|
||||
ShapeType shapeType = CurrentTool;
|
||||
ShapeType shapeType = CurrentShapeTool;
|
||||
|
||||
Color fillColor;
|
||||
|
||||
|
@ -457,7 +457,7 @@ internal void CreateToolbar()
|
|||
tslnudBorderSize.Content.Maximum = 20;
|
||||
tslnudBorderSize.Content.ValueChanged = (sender, e) =>
|
||||
{
|
||||
ShapeType shapeType = CurrentTool;
|
||||
ShapeType shapeType = CurrentShapeTool;
|
||||
|
||||
int borderSize = (int)tslnudBorderSize.Content.Value;
|
||||
|
||||
|
@ -487,7 +487,7 @@ internal void CreateToolbar()
|
|||
tslnudCornerRadius.Content.Maximum = 150;
|
||||
tslnudCornerRadius.Content.ValueChanged = (sender, e) =>
|
||||
{
|
||||
ShapeType shapeType = CurrentTool;
|
||||
ShapeType shapeType = CurrentShapeTool;
|
||||
|
||||
if (shapeType == ShapeType.RegionRectangle)
|
||||
{
|
||||
|
@ -1263,10 +1263,7 @@ private void UpdateMenu()
|
|||
}
|
||||
|
||||
// use menu of current shape in case of an active select tool.
|
||||
if (CurrentShape != null && shapeType == ShapeType.ToolSelect)
|
||||
{
|
||||
shapeType = CurrentShape.ShapeType;
|
||||
}
|
||||
shapeType = CurrentShapeTool;
|
||||
|
||||
Color borderColor;
|
||||
|
||||
|
|
Loading…
Reference in a new issue