Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
MikiraSora committed Oct 22, 2024
1 parent 1544cbd commit 384ef4e
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public async void PasteCopiesObjects(PasteOption mirrorOption, Point? placePoint
await IoC.Get<IFumenEditorClipboard>().PasteObjects(this, mirrorOption, placePoint);
}

public void MenuItemAction_MirrorSelectionXGridZero()
public void MenuItemAction_MirrorSelectionXGridZero(ActionExecutionContext ctx)
{
var selection = SelectObjects.OfType<OngekiMovableObjectBase>().ToList();
if (selection.Count == 0)
Expand All @@ -243,7 +243,7 @@ public void MenuItemAction_MirrorSelectionXGridZero()
UndoRedoManager.ExecuteAction(new LambdaUndoAction(Resources.MirrorSelectionXGridZero, func, func));
}

public void MenuItemAction_MirrorSelectionXGrid()
public void MenuItemAction_MirrorSelectionXGrid(ActionExecutionContext ctx)
{
var selection = SelectObjects.OfType<OngekiMovableObjectBase>().ToList();
if (selection.Count == 0)
Expand Down Expand Up @@ -291,7 +291,7 @@ private void MirrorObjectsXGrid(IList<OngekiMovableObjectBase> objects, bool zer
}
}

public void MenuItemAction_MirrorLaneColors()
public void MenuItemAction_MirrorLaneColors(ActionExecutionContext ctx)
{
var laneObjects = SelectObjects.OfType<ConnectableStartObject>()
.Where(o => o.IsDockableLane)
Expand Down Expand Up @@ -1530,14 +1530,16 @@ public void RegisterSelectableObject(OngekiObjectBase obj, Vector2 centerPos, Ve
public void ScrollPage(int page)
{
TGrid changeGrid;

if (!IsDesignMode && TGridCalculator.ConvertYToTGrid_PreviewMode(ViewHeight, this).ToList() is [{ } single]) {

if (!IsDesignMode && TGridCalculator.ConvertYToTGrid_PreviewMode(ViewHeight, this).ToList() is [{ } single])
{
changeGrid = single;
}
else {
else
{
changeGrid = TGridCalculator.ConvertYToTGrid_DesignMode(ViewHeight, this);
}

var change = new GridOffset((float)changeGrid.TotalUnit * page, 0);

ScrollTo(GetCurrentTGrid() + new GridOffset(change.Unit, change.Grid));
Expand Down

0 comments on commit 384ef4e

Please sign in to comment.