mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
- When copying deck to clipboard, do not attempt to check the validity of zone sizes to avoid situations when exceptional, but legal deck compositions (such as two partner Commanders) are not allowed / not fully copied.
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);
|
||||
}
|
||||
|
||||
@@ -93,14 +93,9 @@ public class FDeckViewer extends FScreen {
|
||||
continue;
|
||||
}
|
||||
deckList.append(s.toString()).append(": ");
|
||||
if (s.isSingleCard()) {
|
||||
deckList.append(cp.get(0).getName()).append(nl);
|
||||
}
|
||||
else {
|
||||
deckList.append(nl);
|
||||
for (final Entry<PaperCard, Integer> ev : cp) {
|
||||
deckList.append(ev.getValue()).append(" ").append(ev.getKey()).append(nl);
|
||||
}
|
||||
deckList.append(nl);
|
||||
for (final Entry<PaperCard, Integer> ev : cp) {
|
||||
deckList.append(ev.getValue()).append(" ").append(ev.getKey()).append(nl);
|
||||
}
|
||||
deckList.append(nl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user