Fixes Move and Pattern

* (Fix) Tools - Move and Pattern: When not selecting a ROI will draw black layers
* (Fix) Tool - Move: When making a cut move and move to a overlap zone it will blackout the source rectangle
This commit is contained in:
Tiago Conceição
2020-09-15 18:44:45 +01:00
parent 9d63056fcf
commit 2ca4bfe599
7 changed files with 33 additions and 18 deletions
@@ -166,7 +166,7 @@ namespace UVtools.GUI.Controls
if (ParentToolWindow is null) return true;
BaseOperation.LayerIndexStart = ParentToolWindow.LayerRangeStart;
BaseOperation.LayerIndexEnd = ParentToolWindow.LayerRangeEnd;
if (CanROI)
if (CanROI && BaseOperation.ROI.IsEmpty)
{
BaseOperation.ROI = Program.FrmMain.ROI;
}
+10 -6
View File
@@ -17,6 +17,7 @@ namespace UVtools.GUI.Controls.Tools
{
public OperationMove Operation { get; }
private RadioButton[] radioButtons;
public CtrlToolMove()
{
@@ -28,6 +29,13 @@ namespace UVtools.GUI.Controls.Tools
(uint)Program.FrmMain.ActualLayerImage.Height);
SetOperation(Operation);
radioButtons = new[]
{
rbAnchorTopLeft, rbAnchorTopCenter, rbAnchorTopRight,
rbAnchorMiddleLeft, rbAnchorMiddleCenter, rbAnchorMiddleRight,
rbAnchorBottomLeft, rbAnchorBottomCenter, rbAnchorBottomRight
};
cbMoveType.SelectedIndex = 0;
ExtraActionCall(this);
}
@@ -70,12 +78,7 @@ namespace UVtools.GUI.Controls.Tools
{
base.UpdateOperation();
byte i = 0;
foreach (var radioButton in new[]
{
rbAnchorTopLeft, rbAnchorTopCenter, rbAnchorTopRight,
rbAnchorMiddleLeft, rbAnchorMiddleCenter, rbAnchorMiddleRight,
rbAnchorBottomLeft, rbAnchorBottomCenter, rbAnchorBottomRight
})
foreach (var radioButton in radioButtons)
{
if (radioButton.Checked)
{
@@ -91,6 +94,7 @@ namespace UVtools.GUI.Controls.Tools
Operation.MarginRight = (int)nmMarginRight.Value;
Operation.MarginBottom = (int)nmMarginBottom.Value;
Operation.IsCutMove = cbMoveType.SelectedIndex == 0;
return true;
}
}
+2 -2
View File
@@ -35,5 +35,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.8.2.1")]
[assembly: AssemblyFileVersion("0.8.2.1")]
[assembly: AssemblyVersion("0.8.2.2")]
[assembly: AssemblyFileVersion("0.8.2.2")]