Skip to content

Commit d4926d9

Browse files
authored
Fixup Add Chibi button in the map characters editor (#554)
1 parent e5aebc3 commit d4926d9

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

src/SerialLoops/Controls/MapCharactersSubEditor.axaml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,30 +97,36 @@
9797
</ItemsControl>
9898
</Canvas>
9999

100+
100101
<Grid HorizontalAlignment="Center" ColumnDefinitions="Auto,Auto" RowDefinitions="Auto,Auto,Auto,Auto,Auto" MinWidth="300"
101-
IsEnabled="{Binding SelectedMapCharacter, Converter={x:Static ObjectConverters.IsNotNull}}"
102102
Margin="15 5 15 5">
103103
<TextBlock Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Text="{x:Static assets:Strings.Chibi}"/>
104104
<ComboBox Grid.Row="0" Grid.Column="1" Margin="10,0,0,0"
105+
IsEnabled="{Binding SelectedMapCharacter, Converter={x:Static ObjectConverters.IsNotNull}}"
105106
ItemsSource="{Binding Chibis}" SelectedItem="{Binding SelectedMapCharacter.Chibi}"/>
106107

107-
<controls:ChibiDirectionSelector Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
108-
DataContext="{Binding ChibiDirectionSelector}"/>
108+
<Panel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" IsEnabled="{Binding SelectedMapCharacter, Converter={x:Static ObjectConverters.IsNotNull}}">
109+
<controls:ChibiDirectionSelector
110+
DataContext="{Binding ChibiDirectionSelector}"/>
111+
</Panel>
109112

110113
<TextBlock Grid.Row="2" Grid.Column="0" Text="{x:Static assets:Strings.Script_Section}"/>
111114
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal" Spacing="10" Margin="10,0,0,0">
112115
<ComboBox ItemsSource="{Binding ScriptEditor.ScriptSections}"
113-
SelectedItem="{Binding SelectedMapCharacter.TalkSection}"/>
114-
115-
<Button Content="{x:Static assets:Strings.Remove_Talk_Link}" Command="{Binding RemoveTalkLinkCommand}"/>
116+
SelectedItem="{Binding SelectedMapCharacter.TalkSection}"
117+
IsEnabled="{Binding SelectedMapCharacter, Converter={x:Static ObjectConverters.IsNotNull}}"/>
118+
<Button Content="{x:Static assets:Strings.Remove_Talk_Link}" Command="{Binding RemoveTalkLinkCommand}"
119+
IsEnabled="{Binding SelectedMapCharacter, Converter={x:Static ObjectConverters.IsNotNull}}"/>
116120
</StackPanel>
117121

118122
<Button Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static assets:Strings.Remove_Chibi}"
119-
Command="{Binding RemoveMapCharacterCommand}"/>
123+
Command="{Binding RemoveMapCharacterCommand}"
124+
IsEnabled="{Binding SelectedMapCharacter, Converter={x:Static ObjectConverters.IsNotNull}}"/>
120125

121126
<StackPanel Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" Spacing="10" HorizontalAlignment="Center">
122127
<Button Content="{x:Static assets:Strings.Add_Chibi}" Command="{Binding AddMapCharacterCommand}"/>
123-
<Button Content="{x:Static assets:Strings.Remove_Map_Characters}" Command="{Binding RemoveMapCharactersCommand}"/>
128+
<Button Content="{x:Static assets:Strings.Remove_Map_Characters}" Command="{Binding RemoveMapCharactersCommand}"
129+
IsEnabled="{Binding SelectedMapCharacter, Converter={x:Static ObjectConverters.IsNotNull}}"/>
124130
</StackPanel>
125131
</Grid>
126132
</WrapPanel>

0 commit comments

Comments
 (0)