diff --git a/megameklab/src/megameklab/ui/generalUnit/TransportTab.java b/megameklab/src/megameklab/ui/generalUnit/TransportTab.java index 194d50ce2..398a4d391 100644 --- a/megameklab/src/megameklab/ui/generalUnit/TransportTab.java +++ b/megameklab/src/megameklab/ui/generalUnit/TransportTab.java @@ -376,7 +376,7 @@ private boolean canAddSelectedBay() { return false; } BayData bayType = modelAvailable.getBayType(tblAvailable.convertRowIndexToModel(selected)); - return (doorsAvailable() > 0) || bayType.isInfantryBay(); + return (doorsAvailable() >= bayType.getMinDoors()); } /** @@ -867,7 +867,10 @@ public void stateChanged(ChangeEvent e) { refreshDockingHardpoints(); } else if (column == InstalledBaysModel.COL_DOORS) { - modelInstalled.bayList.get(row).setDoors((Integer) getCellEditorValue()); + int value = (Integer) getCellEditorValue(); + modelInstalled.bayList.get(row).setDoors( + Math.max(value, bay.getMinDoors()) + ); } modelInstalled.fireTableRowsUpdated(row, row); checkButtons();