Skip to content

Commit

Permalink
Don't reset the selected sources each time the sources dialog is open…
Browse files Browse the repository at this point in the history
…ed in homebrew spell window.
  • Loading branch information
Carifio24 committed Apr 7, 2024
1 parent 5e262f0 commit 4fb2a40
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ void setup() {
if (spell != null) {
binding.title.setText(R.string.update_spell);
binding.createSpellButton.setText(R.string.update_spell);
selectedSources.addAll(spell.getSourcebooks());
setSpellInfo(spell);
}

Expand Down Expand Up @@ -426,7 +427,7 @@ private void openSourceSelectionDialog() {
final boolean[] selectedIndices = new boolean[sources.length];
if (spell != null) {
for (int i = 0; i < sources.length; i++) {
selectedIndices[i] = spell.getSourcebooks().contains(sources[i]);
selectedIndices[i] = selectedSources.contains(sources[i]);
}
}

Expand Down

0 comments on commit 4fb2a40

Please sign in to comment.