Skip to content

Commit

Permalink
Fix #101 Disallow removing the only remaining category
Browse files Browse the repository at this point in the history
  • Loading branch information
GrimMaple committed Sep 10, 2024
1 parent 7b6624e commit facd401
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SpeedTool/Windows/GameEditorWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private void DoTab(ref string name, ref Split[] splits)

ImGui.InputText("Category Name", ref name, 256);
ImGui.SameLine();
if(ImGui.Button("Delete category"))
if(ImGui.Button("Delete category") && categories.Length != 1)
{
string tmpName = name;
categories = categories.Where(x => x.Name != tmpName).ToArray();
Expand Down

0 comments on commit facd401

Please sign in to comment.