fix: add delete button for groupings
This commit is contained in:
parent
8fc2a5388b
commit
1c50528fee
|
@ -44,15 +44,27 @@ internal class DatabaseTab : ITab {
|
|||
}
|
||||
|
||||
var first = true;
|
||||
GroupBy? remove = null;
|
||||
foreach (var groupBy in this.GroupBys) {
|
||||
ImGui.TextUnformatted(
|
||||
first
|
||||
? $"Group by {Enum.GetName(groupBy)}"
|
||||
: $"then by {Enum.GetName(groupBy)}"
|
||||
);
|
||||
|
||||
ImGui.SameLine();
|
||||
|
||||
if (ImGuiComponents.IconButton($"remove-{groupBy}", FontAwesomeIcon.Times)) {
|
||||
remove = groupBy;
|
||||
}
|
||||
|
||||
first = false;
|
||||
}
|
||||
|
||||
if (remove != null) {
|
||||
this.GroupBys.Remove(remove.Value);
|
||||
}
|
||||
|
||||
Vector2 buttonSize;
|
||||
ImGui.PushFont(UiBuilder.IconFont);
|
||||
using (new OnDispose(ImGui.PopFont)) {
|
||||
|
|
Loading…
Reference in New Issue