Browse Source

Hide prep panel in lock mode when no prep*.

Sam Jaffe 4 years ago
parent
commit
c50300ddcf
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/main/lombok/org/leumasjaffe/recipe/view/PreparationPanel.java

+ 2 - 0
src/main/lombok/org/leumasjaffe/recipe/view/PreparationPanel.java

@@ -113,6 +113,8 @@ public class PreparationPanel extends JPanel {
 	@Override
 	public void setEnabled(boolean enabled) {
 		super.setEnabled(enabled);
+		// Kind of a kludge unless I add the preparation model as a member
+		setVisible(enabled || !panelDuration.txtTime.getText().equals("0 s"));
 		panelDuration.txtTime.setEditable(enabled);
 	}