Fix refactoring mistake
This commit is contained in:
@@ -186,8 +186,8 @@ namespace UIFixes
|
|||||||
var gridItemAddressA = new R.GridItemAddress(itemAddressA);
|
var gridItemAddressA = new R.GridItemAddress(itemAddressA);
|
||||||
var gridItemAddressB = new R.GridItemAddress(itemAddressB);
|
var gridItemAddressB = new R.GridItemAddress(itemAddressB);
|
||||||
|
|
||||||
LocationInGrid locationA = gridItemAddressA.Location;
|
LocationInGrid locationA = gridItemAddressA.LocationInGrid;
|
||||||
LocationInGrid locationB = gridItemAddressB.Location;
|
LocationInGrid locationB = gridItemAddressB.LocationInGrid;
|
||||||
StashGridClass grid = gridItemAddressA.Grid;
|
StashGridClass grid = gridItemAddressA.Grid;
|
||||||
|
|
||||||
var itemASize = itemA.CalculateRotatedSize(locationA.r);
|
var itemASize = itemA.CalculateRotatedSize(locationA.r);
|
||||||
@@ -256,8 +256,8 @@ namespace UIFixes
|
|||||||
{
|
{
|
||||||
var gridItemAddress = new R.GridItemAddress(itemAddress);
|
var gridItemAddress = new R.GridItemAddress(itemAddress);
|
||||||
|
|
||||||
LocationInGrid targetToLocation = gridItemAddress.Location.Clone();
|
LocationInGrid targetToLocation = gridItemAddress.LocationInGrid.Clone();
|
||||||
targetToLocation.r = targetGridItemAddress.Location.r;
|
targetToLocation.r = targetGridItemAddress.LocationInGrid.r;
|
||||||
|
|
||||||
targetToAddress = R.GridItemAddress.Create(gridItemAddress.Grid, targetToLocation);
|
targetToAddress = R.GridItemAddress.Create(gridItemAddress.Grid, targetToLocation);
|
||||||
}
|
}
|
||||||
@@ -289,8 +289,7 @@ namespace UIFixes
|
|||||||
// If we're coming from a grid, try rotating the target object
|
// If we're coming from a grid, try rotating the target object
|
||||||
if (R.GridItemAddress.Type.IsInstanceOfType(itemAddress))
|
if (R.GridItemAddress.Type.IsInstanceOfType(itemAddress))
|
||||||
{
|
{
|
||||||
var gridItemAddress = new R.GridItemAddress(itemAddress);
|
var targetToLocation = new R.GridItemAddress(targetToAddress).LocationInGrid;
|
||||||
var targetToLocation = gridItemAddress.Location;
|
|
||||||
targetToLocation.r = targetToLocation.r == ItemRotation.Horizontal ? ItemRotation.Vertical : ItemRotation.Horizontal;
|
targetToLocation.r = targetToLocation.r == ItemRotation.Horizontal ? ItemRotation.Vertical : ItemRotation.Horizontal;
|
||||||
if (!ItemsOverlap(item, itemToAddress, targetItem, targetToAddress))
|
if (!ItemsOverlap(item, itemToAddress, targetItem, targetToAddress))
|
||||||
{
|
{
|
||||||
|
2
R.cs
2
R.cs
@@ -200,7 +200,7 @@ namespace UIFixes
|
|||||||
return (ItemAddress)Activator.CreateInstance(Type, [grid, location]);
|
return (ItemAddress)Activator.CreateInstance(Type, [grid, location]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocationInGrid Location { get { return (LocationInGrid)LocationInGridField.GetValue(Value); } }
|
public LocationInGrid LocationInGrid { get { return (LocationInGrid)LocationInGridField.GetValue(Value); } }
|
||||||
public StashGridClass Grid { get { return (StashGridClass)GridProperty.GetValue(Value); } }
|
public StashGridClass Grid { get { return (StashGridClass)GridProperty.GetValue(Value); } }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user