This commit is contained in:
RickyRister 2025-12-29 22:33:04 -08:00
parent 0f67fe1c6b
commit 51da3c5e8e

View file

@ -575,6 +575,7 @@ void DeckEditorDeckDockWidget::changeSelectedCard(int changeBy)
// currentIndex will return an index for the underlying deckModel instead of the proxy. // 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, // That index will return an invalid index when indexBelow/indexAbove crosses a header node,
// causing the selection to fail to move down. // causing the selection to fail to move down.
/// \todo Figure out why it's happening so we can do a proper fix instead of a hacky workaround
if (deckViewCurrentIndex.model() == proxy->sourceModel()) { if (deckViewCurrentIndex.model() == proxy->sourceModel()) {
deckViewCurrentIndex = proxy->mapFromSource(deckViewCurrentIndex); deckViewCurrentIndex = proxy->mapFromSource(deckViewCurrentIndex);
} }