]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionModel.java
focus the first amount after loading a previous transaction
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / ui / new_transaction / NewTransactionModel.java
index 2e9027154ae805014d6e878336434faaa8c6a7e0..ac0cf4b39a703ac1f57669705f37b6db3a4b80df 100644 (file)
@@ -451,6 +451,8 @@ public class NewTransactionModel extends ViewModel {
             else
                 item.resetAmount();
         }
+        if (BuildConfig.DEBUG)
+            dumpItemList("Loaded previous transaction", newList);
 
         if (singleNegativeIndex != -1) {
             firstNegative.resetAmount();
@@ -461,9 +463,9 @@ public class NewTransactionModel extends ViewModel {
             moveItemLast(newList, singlePositiveIndex);
         }
 
-        noteFocusChanged(1, FocusedElement.Description);
-
         setItems(newList);
+
+        noteFocusChanged(1, FocusedElement.Amount);
     }
     /**
      * A transaction is submittable if: