Skip to content

Commit

Permalink
- FIX: Fixed a bug where deleting the first barcode of a plant in phe…
Browse files Browse the repository at this point in the history
…notyping mode would delete the last recorded trait value of the previous plant.
  • Loading branch information
sebastian-raubach committed Aug 3, 2020
1 parent 39fdda0 commit dd88879
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ android {
enabled = true
}

compileSdkVersion 28
compileSdkVersion 29
defaultConfig {
applicationId "uk.ac.hutton.android.germinatescan"
minSdkVersion 24
targetSdkVersion 28
versionCode 43
versionName "1.20.06.02"
targetSdkVersion 29
versionCode 45
versionName "1.20.08.03"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1028,13 +1028,17 @@ public void deleteBarcode()
}
else if (index == 1)
{
// If it's a trait, remove everything including the value of the previous trait.
// If it's a trait, remove everything.
BarcodeReader.this.deleteItem(adapter.getItem(adapter.getItemCount() - 1));
BarcodeReader.this.deleteItem(adapter.getItem(adapter.getItemCount() - 1));
BarcodeReader.this.deleteItem(adapter.getItem(adapter.getItemCount() - 1));
if (adapter.getItemCount() > 0)
currentPhenotype--;
dataset.setCurrentPhenotype(currentPhenotype);
// If it's not the first one, remove the value of the previous trait.
if (currentPhenotype != 0)
{
BarcodeReader.this.deleteItem(adapter.getItem(adapter.getItemCount() - 1));
if (adapter.getItemCount() > 0)
currentPhenotype--;
dataset.setCurrentPhenotype(currentPhenotype);
}
}
else if (index == 0)
{
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/raw-de/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
-->

<changelog bulletedList="true">
<changelogversion
changeDate="03/08/2020"
versionName="1.20.08.03">
<changelogbug>Fehler behoben beim Löschen des ersten Barcodes eine Pflanze im Phänotypisierungsmodus wo der letzte Wert des vorherigen Merkmals gelöscht wurde.</changelogbug>
</changelogversion>
<changelogversion
changeDate="02/06/2020"
versionName="1.20.06.02">
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/raw/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
-->

<changelog bulletedList="true">
<changelogversion
changeDate="03/08/2020"
versionName="1.20.08.03">
<changelogbug>Fixed a bug where deleting the first barcode of a plant in phenotyping mode would delete the last recorded trait value of the previous plant.</changelogbug>
</changelogversion>
<changelogversion
changeDate="02/06/2020"
versionName="1.20.06.02">
Expand Down

0 comments on commit dd88879

Please sign in to comment.