Merge pull request #234 from SinZ163/fix-231

Disable "Import World Config" button when there are no worlds available
This commit is contained in:
John Gross
2018-07-01 09:33:14 -07:00
committed by GitHub

View File

@@ -26,8 +26,8 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<DockPanel Grid.Row="0"> <DockPanel Grid.Row="0">
<Label Content="World:" DockPanel.Dock="Left" /> <Label Content="World:" DockPanel.Dock="Left" />
<Button Content="Import World Config" Margin="3" DockPanel.Dock="Right" Click="ImportConfig_OnClick" ToolTip="Override the DS config with the one from the selected world."/> <Button Content="Import World Config" Margin="3" DockPanel.Dock="Right" Click="ImportConfig_OnClick" ToolTip="Override the DS config with the one from the selected world." IsEnabled="{Binding ElementName=WorldList, Path=Items.Count, Mode=OneWay}"/>
<ComboBox ItemsSource="{Binding Worlds}" SelectedItem="{Binding SelectedWorld}" Margin="3" <ComboBox x:Name="WorldList" ItemsSource="{Binding Worlds}" SelectedItem="{Binding SelectedWorld}" Margin="3"
SelectionChanged="Selector_OnSelectionChanged"> SelectionChanged="Selector_OnSelectionChanged">
<ComboBox.ItemTemplate> <ComboBox.ItemTemplate>
<DataTemplate DataType="managers:WorldViewModel"> <DataTemplate DataType="managers:WorldViewModel">