Create a nil value type for DisableDropSound. (#114)

This commit is contained in:
Glen M
2018-12-05 11:42:59 -05:00
committed by Ben Wallis
parent 892b2f15f2
commit 2415be089b
7 changed files with 49 additions and 21 deletions

View File

@@ -246,6 +246,13 @@
</userControls:ThemeComponentSelectionControl>
</Grid>
</DataTemplate>
<!-- Disable Drop Sound Template -->
<DataTemplate DataType="{x:Type blockItemBaseTypes:NilBlockItem}">
<Grid>
<TextBlock Text="{Binding Description}" VerticalAlignment="Center" />
</Grid>
</DataTemplate>
</ContentControl.Resources>
</ContentControl>
</Grid>

View File

@@ -1309,10 +1309,10 @@ namespace Filtration.ViewModels
}
}
if (input.Count > 0)
{
_scriptCommandManager.ExecuteCommand(new RemoveBlockItemFromBlocksCommand(input));
SetDirtyFlag();
if (input.Count > 0)
{
_scriptCommandManager.ExecuteCommand(new RemoveBlockItemFromBlocksCommand(input));
SetDirtyFlag();
}
}
@@ -1335,15 +1335,15 @@ namespace Filtration.ViewModels
}
if (!found) {
var item = new DisableDropSoundBlockItem(true);
var item = new DisableDropSoundBlockItem();
input.Add(new Tuple<ObservableCollection<IItemFilterBlockItem>, IItemFilterBlockItem>(blockItems, item));
}
}
if (input.Count > 0)
{
if (input.Count > 0)
{
_scriptCommandManager.ExecuteCommand(new AddBlockItemToBlocksCommand(input));
SetDirtyFlag();
SetDirtyFlag();
}
}