HearthSim / Hearthstone-Deck-Tracker

A deck tracker and deck manager for Hearthstone on Windows
https://hsreplay.net/downloads/
4.61k stars 1.11k forks source link

Switches to wrong deck mode tab after deck import #4541

Open anonymous555 opened 2 months ago

anonymous555 commented 2 months ago

Expected Behavior

This used to work before. When importing a deck don't change to the wrong deck mode tab.

Actual Behavior

After importing a standard deck from a deck code, the tracker switches to the wild deck tab. After importing a wild deck from a deck code, the tracker switches to the twist deck tab. Looks like an off by one error somewhere.

Steps to reproduce behavior

No response

Log/Screenshots

No response

anonymous555 commented 1 month ago

Don't know for sure, but maybe the bug is related to here

    public void SelectDeckType(DeckType selectedDeckType, bool ignoreSelectionChange = false)
    {
        if(ListViewDeckType.SelectedIndex == (int)selectedDeckType)
            return;
        if(ignoreSelectionChange)
            _ignoreSelectionChange = true;
        ListViewDeckType.SelectedIndex = (int)selectedDeckType;
        if(ignoreSelectionChange)
            _ignoreSelectionChange = false;
    }

within DeckPicker.xaml.cs or the public enum DeckType

beheh commented 1 month ago

Hey there, thanks for the report! Do you have a deck code of a deck that's consistently failing to select?

anonymous555 commented 1 month ago

**Seems to be the case for any deck .... for example

Click standard decks, import this**

Handbuff Death Knight

Class: Death Knight

Format: Standard

#

2x (1) Lesser Spinel Spellstone

2x (1) Miracle Salesman

2x (2) Blood Tap

2x (2) Mining Casualties

2x (2) Shambling Zombietank

2x (3) Chillfallen Baron

2x (3) Rainbow Seamstress

2x (3) Toysnatching Geist

2x (4) Darkthorn Quilter

1x (4) Maw and Paw

2x (4) Nerubian Swarmguard

2x (4) Yelling Yodeler

2x (5) Amateur Puppeteer

2x (6) Gnome Muncher

2x (6) Hollow Hound

1x (20) Reska, the Pit Boss

# AAECAfHhBAKLkgb/lwYOh/YEs/cEj+QF8OgFhY4GkqAGubEGurEGvLEG9rEGi7cGz7wG1+UG2eUGAAA=

To use this deck, copy it to your clipboard and create a new deck in Hearthstone

Find this deck on https://hsreplay.net/decks/XYz2C1NF4ktOPlz8VM4dDb/

Then the wild tab gets selected.

anonymous555 commented 1 month ago

Same problem with wild.... Click wild, import the below deck, then the twist tab gets selected....

Warlock

Class: Warlock

Format: Wild

#

2x (0) Raise Dead

2x (1) Animated Broomstick

2x (1) Crystallizer

2x (1) Dark Pact

2x (1) Kobold Librarian

2x (1) Mass Production

2x (1) Spirit Bomb

1x (1) The Demon Seed

1x (1) The Soularium

2x (1) Touch of the Nathrezim

2x (1) Tour Guide

2x (2) Elementium Geode

2x (3) Darkglare

2x (9) Imprisoned Horror

2x (10) Flesh Giant

2x (22) Molten Giant

# AAEBAf0GAo+CA4T7Aw7y0AL40AL6/gLLuQOVzQObzQPXzgPB0QOD+wPO+gXEngajoAbDuAbw5gYAAA==

To use this deck, copy it to your clipboard and create a new deck in Hearthstone

Find this deck on https://hsreplay.net/decks/Qr40unUUHTEAFYRbVR3aud/