فهرست منبع

Remove unneeded include

Sam Jaffe 8 سال پیش
والد
کامیت
231e7aa57e

+ 1 - 3
src/main/lombok/org/leumasjaffe/charsheet/view/magic/PrepareSpellsDialog.java

@@ -11,7 +11,6 @@ import org.leumasjaffe.charsheet.model.DDCharacterClass;
 import org.leumasjaffe.charsheet.model.magic.DDSpellbook;
 import org.leumasjaffe.charsheet.model.magic.impl.Prepared;
 import org.leumasjaffe.charsheet.model.observable.BoolGate;
-import org.leumasjaffe.charsheet.model.observable.IntValue;
 import org.leumasjaffe.observer.ObservableListener;
 import org.leumasjaffe.observer.ObserverDispatch;
 
@@ -88,8 +87,7 @@ public class PrepareSpellsDialog extends JPanel {
 		SpellPicker pick = new PrepareSpellPicker(tup);
 		for (int i = 0; i < highestSpellLevel; ++i) {
 			SelectSpellsPanel lvl = new SelectSpellsPanel(pick, gate.handle(i), i,
-					((Prepared) spellBook).getSpellsPreparedPreviouslyForLevel(i),
-					new IntValue(-1));
+					((Prepared) spellBook).getSpellsPreparedPreviouslyForLevel(i), null);
 			panels.add(lvl);
 			panel.add(lvl);
 		}

+ 1 - 1
src/main/lombok/org/leumasjaffe/charsheet/view/magic/SelectSpellsPanel.java

@@ -83,7 +83,7 @@ public class SelectSpellsPanel extends JPanel {
 	public SelectSpellsPanel(SpellPicker pick, BoolGate.Handle gate, int level, 
 			Collection<DDSpell> prepared, IntValue sharedValue) {
 		this.allowsDuplicates = pick.allowsDuplicates();
-		this.sharedValue = sharedValue;
+		this.sharedValue = sharedValue == null ? new IntValue(-1) : sharedValue;
 		this.prepared = new ArrayList<>(prepared);
 		final List<DDSpell> known = new ArrayList<>(pick.getAvailableSpells(level));
 		this.modelPrepared = new SelectSpellModel(createModel(prepared));