Skip to content

Commit ca50956

Browse files
committed
feature: Remove the "Use default modules" button when default modules are already selected.
1 parent fe0e3ae commit ca50956

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Yafc/Workspace/ProductionTable/ProductionTableView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ private void ShowModuleDropDown(ImGui gui, RecipeRow recipe) {
597597
.OrderByDescending(x => x.template.IsCompatibleWith(recipe))];
598598

599599
gui.ShowDropDown(dropGui => {
600-
if (dropGui.BuildButton("Use default modules").WithTooltip(dropGui, "Shortcut: right-click") && dropGui.CloseDropdown()) {
600+
if (recipe.modules != null && dropGui.BuildButton("Use default modules").WithTooltip(dropGui, "Shortcut: right-click") && dropGui.CloseDropdown()) {
601601
recipe.RemoveFixedModules();
602602
}
603603

0 commit comments

Comments
 (0)