Thumbnail strip: show hotkey label next to each scene name
This commit is contained in:
@@ -404,6 +404,22 @@ public class MainViewModel : ViewModelBase
|
||||
// Reload bindings from DB (the dialog already saved them).
|
||||
_hotkeyBindings = _layoutStore.LoadHotkeyBindings();
|
||||
HotkeyBindingsChanged?.Invoke(_hotkeyBindings);
|
||||
RefreshHotkeyLabels();
|
||||
}
|
||||
}
|
||||
|
||||
private void RefreshHotkeyLabels()
|
||||
{
|
||||
foreach (var scene in Scenes)
|
||||
{
|
||||
if (SceneCatalog.SceneHotkeys.TryGetValue(scene.Name, out var hid)
|
||||
&& _hotkeyBindings.TryGetValue(hid, out var chord))
|
||||
scene.HotkeyLabel = chord.ToDisplayString();
|
||||
else if (SceneCatalog.SceneHotkeys.TryGetValue(scene.Name, out var defId)
|
||||
&& GlobalHotkeyManager.Defaults.TryGetValue(defId, out var defChord))
|
||||
scene.HotkeyLabel = defChord.ToDisplayString();
|
||||
else
|
||||
scene.HotkeyLabel = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1842,6 +1858,7 @@ public class MainViewModel : ViewModelBase
|
||||
AddScene(name);
|
||||
}
|
||||
HealBackgrounds();
|
||||
RefreshHotkeyLabels();
|
||||
|
||||
foreach (var scene in Scenes)
|
||||
foreach (var config in scene.Elements.OfType<WebcamSceneConfig>())
|
||||
|
||||
Reference in New Issue
Block a user