fix: handle null groups
This commit is contained in:
parent
6997af9431
commit
090c71b44d
|
@ -15,10 +15,12 @@ public class Configuration : IPluginConfiguration {
|
|||
|
||||
public string SaveFileNameFormat = """
|
||||
{{ captured_at_local | date.to_string '%Y/%m %b/[%H.%M.%S]' }}
|
||||
{{ active_character.name }}
|
||||
-
|
||||
{{ location }}
|
||||
|
||||
{{ if active_character -}}
|
||||
{{ active_character.name }} - {{ location }}
|
||||
{{- else -}}
|
||||
Main Menu or Loading Screen
|
||||
{{- end -}}
|
||||
|
||||
{{- if area }} ({{ area }}) {{- end -}}
|
||||
{{- if ward }} W{{ ward }} {{- end -}}
|
||||
{{- if plot -}} P{{ plot }} {{- end -}}
|
||||
|
|
|
@ -139,7 +139,7 @@ internal class DatabaseTab : ITab {
|
|||
ImGui.PushID($"{Enum.GetName(groupBy.Value)}-{label}");
|
||||
using var popId = new OnDispose(ImGui.PopID);
|
||||
|
||||
if (!ImGui.TreeNodeEx(label)) {
|
||||
if (!ImGui.TreeNodeEx(label ?? "<unknown>")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -168,7 +168,7 @@ internal class DatabaseTab : ITab {
|
|||
using var treePop = new OnDispose(ImGui.TreePop);
|
||||
|
||||
var availWidth = ImGui.GetContentRegionAvail().X;
|
||||
var buttonWidth = availWidth / 2 - ImGui.GetStyle().ItemSpacing.X;
|
||||
var buttonWidth = availWidth / 2 - ImGui.GetStyle().ItemSpacing.X / 2;
|
||||
|
||||
if (ImGui.Button("Open", new Vector2(buttonWidth, 0))) {
|
||||
Process.Start(new ProcessStartInfo(shot.Path) {
|
||||
|
|
Loading…
Reference in New Issue