Fix settings repository UI.
- Verbessert: Benutzer-Interface der Stile-Verwaltung.
This commit is contained in:
parent
253a7f24f5
commit
1a49eb18e1
@ -27,7 +27,7 @@
|
||||
<button id="zrlFormatLab" label="Formatieren" image="f.png" onAction="Ribbon_Click" size="large"
|
||||
supertip="Formatiert den ausgewählten Bereich mit dem zuletzt verwendeten Stil."
|
||||
getEnabled="CanFormat" />
|
||||
<button id="zrlSettings" label="Stilauswahl" image="fff.png" onAction="Ribbon_Click" size="large"
|
||||
<button id="zrlSettings" label="Stile verwalten" image="fff.png" onAction="Ribbon_Click" size="large"
|
||||
supertip="Zeigt eine Liste vorhandener Stile an. Stile können bearbeitet, hinzugefügt, gelöscht werden." />
|
||||
</group>
|
||||
<group id="zrlGroupDrugs" label="Medikamente">
|
||||
|
@ -350,11 +350,17 @@ namespace zaaReloaded2.ViewModels
|
||||
void ConfirmDeleteSettings(ViewModelMessageContent content)
|
||||
{
|
||||
SettingsViewModel vm = content.ViewModel as SettingsViewModel;
|
||||
int oldIndex = SettingsList.IndexOf(vm);
|
||||
if (CanDeleteSettings() && content.Confirmed)
|
||||
{
|
||||
_repository.SettingsList.Remove(vm.RevealModelObject() as Settings);
|
||||
SettingsList.Remove(vm);
|
||||
}
|
||||
int newIndex = (oldIndex < SettingsList.Count) ? oldIndex : SettingsList.Count - 1;
|
||||
if (newIndex >= 0)
|
||||
{
|
||||
SettingsList[newIndex].IsSelected = true;
|
||||
}
|
||||
}
|
||||
|
||||
void DoResetSettings()
|
||||
@ -424,6 +430,7 @@ namespace zaaReloaded2.ViewModels
|
||||
{
|
||||
settingsViewModel.PropertyChanged += SettingsViewModel_PropertyChanged;
|
||||
SettingsList.Add(settingsViewModel);
|
||||
settingsViewModel.IsSelected = true;
|
||||
}
|
||||
|
||||
void DoExportSettings()
|
||||
|
@ -66,7 +66,7 @@
|
||||
ToolTip="Stil auswählen und Textblock damit formatieren (Enter)">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="/zaaReloaded2;component/Icons/f.png" Width="32" />
|
||||
<TextBlock VerticalAlignment="Center" Margin="10 0 0 0">Auswählen</TextBlock>
|
||||
<TextBlock VerticalAlignment="Center" Margin="10 0 0 0">Auswählen & formatieren</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<UniformGrid Columns="2" Margin="0 10 0 0" x:Name="buttonsPanel">
|
||||
|
Loading…
Reference in New Issue
Block a user