Skip to content

Commit

Permalink
Merge pull request #975 from cadon/dev
Browse files Browse the repository at this point in the history
merge to master
  • Loading branch information
cadon authored Oct 8, 2019
2 parents 15ccca5 + fcad741 commit 1819602
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ARKBreedingStats/BreedingPlan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,10 @@ public Species CurrentSpecies
private void listViewSpeciesBP_SelectedIndexChanged(object sender, EventArgs e)
{
if (listViewSpeciesBP.SelectedIndices.Count > 0
&& listViewSpeciesBP.SelectedItems[0].Text != currentSpecies.DescriptiveNameAndMod)
&& !string.IsNullOrEmpty(listViewSpeciesBP.SelectedItems[0]?.Text)
&& (currentSpecies == null
|| listViewSpeciesBP.SelectedItems[0].Text != currentSpecies.DescriptiveNameAndMod)
)
{
SetGlobalSpecies?.Invoke((Species)((ListViewItem)listViewSpeciesBP.SelectedItems[0]).Tag);
}
Expand Down
3 changes: 2 additions & 1 deletion ARKBreedingStats/Form1.collection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,8 @@ private bool LoadCollectionFile(string filePath, bool keepCurrentCreatures = fal
|| !creatureCollection.creatures.Any(c => c.Species.Equals(selectedlibrarySpecies))
)
selectedlibrarySpecies = speciesSelector1.SelectedSpecies;
listBoxSpeciesLib.SelectedIndex = listBoxSpeciesLib.Items.IndexOf(selectedlibrarySpecies);
if (selectedlibrarySpecies != null)
listBoxSpeciesLib.SelectedIndex = listBoxSpeciesLib.Items.IndexOf(selectedlibrarySpecies);

filterListAllowed = true;
FilterLib();
Expand Down

0 comments on commit 1819602

Please sign in to comment.