mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Merge branch 'assorted-fixes' into 'master'
Attempting to fix "Copy to Clipboard" not copying e.g. dual partner commanders. See merge request core-developers/forge!274
This commit is contained in:
@@ -184,23 +184,18 @@ public class FDeckViewer extends FDialog {
|
||||
}
|
||||
deckList.append(s.toString()).append(": ");
|
||||
sectionCards = new TreeMap<>();
|
||||
if (s.isSingleCard()) {
|
||||
deckList.append(cp.get(0).getName()).append(nl);
|
||||
deckList.append(nl);
|
||||
for (final Entry<PaperCard, Integer> ev : cp) {
|
||||
cardName = ev.getKey().toString();
|
||||
if (sectionCards.containsKey(cardName)) {
|
||||
sectionCards.put(cardName, (int)sectionCards.get(cardName) + ev.getValue());
|
||||
}
|
||||
else {
|
||||
sectionCards.put(cardName, ev.getValue());
|
||||
}
|
||||
}
|
||||
else {
|
||||
deckList.append(nl);
|
||||
for (final Entry<PaperCard, Integer> ev : cp) {
|
||||
cardName = ev.getKey().toString();
|
||||
if (sectionCards.containsKey(cardName)) {
|
||||
sectionCards.put(cardName, (int)sectionCards.get(cardName) + ev.getValue());
|
||||
}
|
||||
else {
|
||||
sectionCards.put(cardName, ev.getValue());
|
||||
}
|
||||
}
|
||||
for (final Entry<String, Integer> ev: sectionCards.entrySet()) {
|
||||
deckList.append(ev.getValue()).append(" ").append(ev.getKey()).append(nl);
|
||||
}
|
||||
for (final Entry<String, Integer> ev: sectionCards.entrySet()) {
|
||||
deckList.append(ev.getValue()).append(" ").append(ev.getKey()).append(nl);
|
||||
}
|
||||
deckList.append(nl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user