Selaa lähdekoodia

Hide prep panel in lock mode when no prep*.

Sam Jaffe 4 vuotta sitten
vanhempi
commit
c50300ddcf

+ 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);
 	}