Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.

Commit 9483cc4

Browse files
committed
Got palette source updating event to work for tilemap cam view again.
1 parent 8699048 commit 9483cc4

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

Samples/FlapOrDie/FlapOrDie.Sample.Core.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<ProjectReference Include="..\..\Source\Core\Duality\Duality.csproj">
1515
<Private>False</Private>
1616
</ProjectReference>
17+
<ProjectReference Include="..\..\Source\Editor\DualityEditor\DualityEditor.csproj" />
1718
</ItemGroup>
1819

1920
</Project>

Source/Plugins/Tilemaps/Editor/CamViewStates/TilemapEditorCamViewState.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ protected override void OnEnterState()
630630
DualityEditorApp.ObjectPropertyChanged += this.DualityEditorApp_ObjectPropertyChanged;
631631
DualityEditorApp.UpdatingEngine += this.DualityEditorApp_UpdatingEngine;
632632
Scene.Entered += this.Scene_Entered;
633-
TilemapsEditorPlugin.Instance.PeekTilePalette().SelectedAreaChanged += this.TilemapToolSourcePalette_SelectedAreaChanged;
633+
TilemapsEditorPlugin.Instance.TileDrawingSourceChanged += this.TilemapToolSourcePalette_SelectedAreaChanged;
634634

635635
// Initial update
636636
this.UpdateTilemapToolButtons();
@@ -1046,6 +1046,7 @@ private void Scene_Entered(object sender, EventArgs e)
10461046
}
10471047
private void TilemapToolSourcePalette_SelectedAreaChanged(object sender, EventArgs e)
10481048
{
1049+
this.activeTool.UpdatePreview();
10491050
this.Invalidate();
10501051
}
10511052

Source/Plugins/Tilemaps/Editor/Modules/SourcePaletteTilesetView.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ public Rectangle SelectedArea
8181
this.selectedArea.Width,
8282
this.selectedArea.Height,
8383
6);
84-
this.SelectedAreaChanged?.Invoke(this, EventArgs.Empty);
8584
}
8685
}
8786
public IReadOnlyGrid<Tile> SelectedTiles

0 commit comments

Comments
 (0)