Skip to content

Commit 5febc13

Browse files
committed
columns for cards with excessive numbers of sets
1 parent 4169602 commit 5febc13

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pcmwindow.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ bool quint64GreaterThan(const quint64 &v1, const quint64 &v2)
272272
{
273273
return v1 > v2;
274274
}
275-
276275
void PCMWindow::HandleMultipleCards(OracleCard card, QList<quint64> lCardIDs)
277276
{
278277
ui->cardAction->setText("Multiple Versions");
@@ -303,18 +302,20 @@ void PCMWindow::HandleMultipleCards(OracleCard card, QList<quint64> lCardIDs)
303302
}
304303

305304
//As we haven't been able to trash the card, now we must determine what set it is from
306-
QVBoxLayout *MySetSelectorLayout = new QVBoxLayout();
305+
QGridLayout *MySetSelectorLayout = new QGridLayout();
307306

308307
//we want the list to sort most recent set first, greatest multiverseID first is a close aproximation of that
309308
qSort(lCardIDs.begin(), lCardIDs.end(), quint64GreaterThan);
310309

310+
int count = 0;
311311
for(auto&& CardID: lCardIDs)
312312
{
313313
OracleCard priceCard = qmOracle.value(CardID);
314314

315315
SetChoice *thisChoice = new SetChoice(priceCard, MySetSelectorLayout->widget());
316316
thisChoice->setParent(MySetSelectorLayout->widget());
317-
MySetSelectorLayout->addWidget((QWidget*)thisChoice);
317+
MySetSelectorLayout->addWidget((QWidget*)thisChoice, count % 10, count / 10);
318+
count++;
318319
connect(thisChoice, SIGNAL(clicked(bool)), this, SLOT(setSelected()));
319320
}
320321

pcmwindow.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<item row="1" column="0">
1919
<widget class="QTabWidget" name="tabWidget">
2020
<property name="currentIndex">
21-
<number>0</number>
21+
<number>1</number>
2222
</property>
2323
<widget class="QWidget" name="mainTab">
2424
<attribute name="title">

0 commit comments

Comments
 (0)