mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2025-04-15 21:46:33 +00:00
parent
0126ff83c6
commit
6a323661a7
@ -44,7 +44,7 @@ public class ClickBlockSpeciesManager extends DataBlockSpeciesManager<ClickDetec
|
||||
}
|
||||
int listIndex = masterManager.codeToListIndex(dataUnit.getClickType());
|
||||
if (listIndex < 0) {
|
||||
return null;
|
||||
return getDefaultSpeciesCode();
|
||||
}
|
||||
return masterManager.getSpeciesList()[listIndex];
|
||||
}
|
||||
|
@ -72,6 +72,9 @@ public class ClickTypeMasterManager implements ClickTypeProvider {
|
||||
|
||||
@Override
|
||||
public int codeToListIndex(int code) {
|
||||
if (code == 0) {
|
||||
return -1;
|
||||
}
|
||||
if (types==null) return -1;
|
||||
for (int i=0; i<types.length; i++) {
|
||||
if (types[i]==code) return i;
|
||||
|
Loading…
Reference in New Issue
Block a user