Skip to content

Commit

Permalink
Fixed issue #6, where texture were not removable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Xeeynamo committed Dec 28, 2017
1 parent 7b1cd01 commit 734d4e8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions AnimationEditor/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// 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("1.2.1.0")]
[assembly: AssemblyFileVersion("1.2.1.0")]
[assembly: AssemblyVersion("1.2.2.0")]
[assembly: AssemblyFileVersion("1.2.2.0")]
1 change: 0 additions & 1 deletion AnimationEditor/TextureWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ private void ButtonAdd_Click(object sender, RoutedEventArgs e)
if (fileName != null)
{
ViewModel.AddTexture(fileName);
MainViewModel.AnimationData.SpriteSheets.Add(fileName);
SelectedIndex = ViewModel.Count - 1;
}
}
Expand Down
2 changes: 2 additions & 0 deletions AnimationEditor/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,8 @@ public bool ChangeCurrentAnimationName(string name)

public void SaveChanges()
{
_animationData.SpriteSheets.Clear();
_animationData.SpriteSheets.AddRange(Textures);
_animationData.SetAnimations(Animations);
if (IsHitboxV3)
{
Expand Down
5 changes: 4 additions & 1 deletion AnimationEditor/ViewModels/TextureWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ public string SelectedValue
set
{
_selectedValue = value;
CurrentTexture = new TextureViewModel(value, BasePath);
if (_selectedValue != null)
CurrentTexture = new TextureViewModel(value, BasePath);
else
CurrentTexture = null;
OnPropertyChanged(nameof(SelectedValue));
OnPropertyChanged(nameof(IsValueSelected));
OnPropertyChanged(nameof(CurrentTexture));
Expand Down

0 comments on commit 734d4e8

Please sign in to comment.