remove debug

This commit is contained in:
RickyRister 2025-12-29 21:24:24 -08:00
parent c62fb85271
commit 0f67fe1c6b

View file

@ -572,16 +572,14 @@ void DeckEditorDeckDockWidget::changeSelectedCard(int changeBy)
auto deckViewCurrentIndex = deckView->currentIndex();
// For some reason, if the deckModel is modified but the view is not manually reselected,
// currentIndex will return an index for the underlying deckModel instead of the proxy,
// which won't behave as expected when indexBelow/indexAbove crosses a header node.
if (deckViewCurrentIndex.model() == deckModel) {
// currentIndex will return an index for the underlying deckModel instead of the proxy.
// That index will return an invalid index when indexBelow/indexAbove crosses a header node,
// causing the selection to fail to move down.
if (deckViewCurrentIndex.model() == proxy->sourceModel()) {
deckViewCurrentIndex = proxy->mapFromSource(deckViewCurrentIndex);
}
auto nextIndex = deckViewCurrentIndex.siblingAtRow(deckViewCurrentIndex.row() + changeBy);
qInfo() << "TRACK current:" << deckViewCurrentIndex << "next:" << nextIndex;
if (!nextIndex.isValid()) {
nextIndex = deckViewCurrentIndex;
@ -593,9 +591,6 @@ void DeckEditorDeckDockWidget::changeSelectedCard(int changeBy)
} else {
nextIndex = deckView->indexAbove(nextIndex);
}
qInfo() << "TRACK nextIndex:" << nextIndex;
node = static_cast<AbstractDecklistNode *>(nextIndex.internalPointer());
} while (node && node->isDeckHeader());
}