From b0e7536babdeb3e1cc5d63150c84978ee63b8546 Mon Sep 17 00:00:00 2001 From: Benedict Etzel Date: Fri, 13 Dec 2024 00:40:37 +0100 Subject: [PATCH] fix: select matching tab after importing a deck Fixes #4541 --- CHANGELOG.md | 1 + Hearthstone Deck Tracker/Controls/DeckPicker/DeckPicker.xaml.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4a3cca20..777031680 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - Added related card tooltip to Grand Magister Rommath. - Added related card tooltips to most cards that resurrect from the Graveyard.\ *Abominable Bowman, All Fel Breaks Loose, Amulet of Undying, Animate Dead, Anyfin Can Happen, Bloodreaver Gul'dan, Body Wrapper, Bonecaller, Boneshredder, Catrina Muerte, Counterfeit Blade, Da Undatakah, Defense Attorney Nathanos, Eternal Servitude, Habeas Corpses, Hadronox, Infantry Reanimator, Jewel of N'Zoth, Lesser Diamond Spell Stone, Mass Resurrection, N'Zoth, God of the Deep, N'Zoth, The Corruptor, Onyx Bishop, Psychopomp, Raise Dead, Rally!, Resurrect, Revive Pet, Tamsin's Phylactery, Tomb Lurker, Twilight's Call, Unending Swarm, Vectus, Witching Hour, Xyrella, the Devout* +- Fixed the deck selector switching to the wrong tab after importing a deck. **Battlegrounds**: - Added counters for Beetle stats, Spells played and the the Undead attack bonus. diff --git a/Hearthstone Deck Tracker/Controls/DeckPicker/DeckPicker.xaml.cs b/Hearthstone Deck Tracker/Controls/DeckPicker/DeckPicker.xaml.cs index 8a1bcfc1f..e9feb8085 100644 --- a/Hearthstone Deck Tracker/Controls/DeckPicker/DeckPicker.xaml.cs +++ b/Hearthstone Deck Tracker/Controls/DeckPicker/DeckPicker.xaml.cs @@ -644,7 +644,7 @@ public void SelectDeckType(DeckType selectedDeckType, bool ignoreSelectionChange return; if(ignoreSelectionChange) _ignoreSelectionChange = true; - ListViewDeckType.SelectedIndex = (int)selectedDeckType; + ListViewDeckType.SelectedIndex = DeckTypeItems.IndexOf(selectedDeckType); if(ignoreSelectionChange) _ignoreSelectionChange = false; }