mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Fixed bug that leaves unmodifiable lines for lands in the deck editor.
Happens when you add more than one land from the same expansion with quantity > 1 and e.g. pushed new button afterwards.
This commit is contained in:
parent
7e3944ef66
commit
fe72ab9192
1 changed files with 3 additions and 3 deletions
|
|
@ -116,12 +116,12 @@ public class TableModel extends AbstractTableModel implements ICardGrid {
|
|||
}
|
||||
for (int j = 0; j < view.size(); j++) {
|
||||
CardView cv = view.get(j);
|
||||
if (cv.getId().equals(entry.getKey())) {
|
||||
if (cv.getId().equals(entry.getValue().getId())) {
|
||||
if (count > 0) {
|
||||
// replace by another card with the same name+setCode
|
||||
String key1 = cv.getName()+cv.getExpansionSetCode();
|
||||
String key1 = cv.getName()+cv.getExpansionSetCode()+cv.getCardNumber();
|
||||
for (CardView cardView : cards.values()) {
|
||||
String key2 = cardView.getName()+cardView.getExpansionSetCode();
|
||||
String key2 = cardView.getName()+cardView.getExpansionSetCode()+cardView.getCardNumber();
|
||||
if ((key1).equals(key2)) {
|
||||
view.set(j, cardView);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue