Skip to content

Commit

Permalink
v0.3.8,
Browse files Browse the repository at this point in the history
old noted kept after reimporting,
fixed screenshot using the current deck (with played cards grayed out) instead of the complete one
  • Loading branch information
epix37 committed Jul 6, 2014
1 parent 3c8e092 commit eb4553f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Hearthstone Deck Tracker/Deck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ public Deck()
{
Cards = new ObservableCollection<Card>();
Tags = new List<string>();
Note = string.Empty;
Url = string.Empty;
}

public Deck(string name, string className, IEnumerable<Card> cards, IEnumerable<string> tags, string note, string url)
Expand Down
16 changes: 13 additions & 3 deletions Hearthstone Deck Tracker/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1003,8 +1003,11 @@ private void ButtonNoDeck_Click(object sender, RoutedEventArgs e)
_overlay.ListViewPlayer.ItemsSource = _hearthstone.PlayerDrawn;
_playerWindow.ListViewPlayer.ItemsSource = _hearthstone.PlayerDrawn;
_hearthstone.IsUsingPremade = false;
DeckPickerList.SelectedDeck.IsSelectedInGui = false;
DeckPickerList.SelectedDeck = null;
DeckPickerList.SelectedIndex = -1;
DeckPickerList.ListboxPicker.Items.Refresh();

UpdateDeckList(null);
UseDeck(null);
EnableDeckButtons(false);
Expand Down Expand Up @@ -1154,7 +1157,7 @@ private void BtnNotes_Click(object sender, RoutedEventArgs e)
private async void BtnScreenhot_Click(object sender, RoutedEventArgs e)
{
if (DeckPickerList.SelectedDeck == null) return;
PlayerWindow screenShotWindow = new PlayerWindow(_config, _hearthstone.PlayerDeck, true);
PlayerWindow screenShotWindow = new PlayerWindow(_config, DeckPickerList.SelectedDeck.Cards, true);
screenShotWindow.Show();
screenShotWindow.Top = 0;
screenShotWindow.Left = 0;
Expand Down Expand Up @@ -1355,9 +1358,16 @@ private async void BtnImport_OnClick(object sender, RoutedEventArgs e)

if (deck != null)
{
deck.Url = url;
deck.Note += url;
var reimport = _editingDeck && _newDeck != null && _newDeck.Url == url;

deck.Url = url;

if(reimport) //keep old notes
deck.Note = _newDeck.Note;

if(!deck.Note.Contains(url))
deck.Note = url + "\n" + deck.Note;

ClearNewDeckSection();
_newContainsDeck = true;
_editingDeck = reimport;
Expand Down
2 changes: 1 addition & 1 deletion Hearthstone Deck Tracker/Version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<Version>
<Major>0</Major>
<Minor>3</Minor>
<Revision>7</Revision>
<Revision>8</Revision>
<Build>0</Build>
</Version>

0 comments on commit eb4553f

Please sign in to comment.