Skip to content
Snippets Groups Projects
Commit 6ad4247d authored by Karim Ajouz's avatar Karim Ajouz
Browse files

Fixed bug where you could corroborate by selecting an evidence item twice;

parent 76715898
Branches
No related merge requests found
...@@ -89,6 +89,7 @@ public class EvidenceHandler : MonoBehaviour { ...@@ -89,6 +89,7 @@ public class EvidenceHandler : MonoBehaviour {
//If yes, add the item to the list of potential corroborations. //If yes, add the item to the list of potential corroborations.
potentialMatches.Add(allCorroborations[i]); potentialMatches.Add(allCorroborations[i]);
} }
//Test if this corroboration's second item id is equal to the first evidence id input. //Test if this corroboration's second item id is equal to the first evidence id input.
else if (allCorroborations[i].e2_id == e1.id) else if (allCorroborations[i].e2_id == e1.id)
{ {
......
...@@ -81,7 +81,11 @@ public class Notebook : MonoBehaviour ...@@ -81,7 +81,11 @@ public class Notebook : MonoBehaviour
void addSelected(string id) void addSelected(string id)
{ {
_selected.Add(_handler.GetEvidenceFromID(id)); if(_selected.Count > 0)
{
if(_selected[0].id != id)
_selected.Add(_handler.GetEvidenceFromID(id));
}
} }
public void AddClues(Evidence e) public void AddClues(Evidence e)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment