This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See http://git.chorem.org/lima.git commit 1cd1b3babcc387e44cebb7497e4f5ce0d3543d70 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Jan 16 17:40:17 2015 +0100 fixes #1120 #1117 : fucus sur la transaction + création d'une transaction avec un seul ligne --- .../org/chorem/lima/ui/common/FinancialTransactionTableModel.java | 5 ----- .../ui/financialtransaction/FinancialTransactionViewHandler.java | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialTransactionTableModel.java b/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialTransactionTableModel.java index 86daa6b..53c028c 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialTransactionTableModel.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialTransactionTableModel.java @@ -181,11 +181,6 @@ public class FinancialTransactionTableModel extends TableModelWithGroup<Entry> { newEntry.setFinancialTransaction(newTransaction); newEntry = financialTransactionService.createEntry(newEntry); newTransaction.addEntry(newEntry); - - newEntry = new EntryImpl(); - newEntry.setFinancialTransaction(newTransaction); - newEntry = financialTransactionService.createEntry(newEntry); - newTransaction.addEntry(newEntry); } else { for (Entry entry : transaction.getEntry()) { Entry newEntry = new EntryImpl(); diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java index dddd98a..a4e54cd 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java @@ -445,7 +445,10 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo } int index = tableModel.indexOf(transaction); selectionModel.setSelectionInterval(index, index); + table.changeSelection(index, 1, false, false); table.editCellAt(index, 1); + table.scrollRowToVisible(Math.max(0, index - 5)); + table.scrollRowToVisible(Math.min(tableModel.size() -1 , index + transaction.sizeEntry() + 5)); } catch (LockedFinancialPeriodException e) { errorHelper.showErrorMessage(t("lima.entries.paste.transaction.error.lockedFinancialPeriod", e.getFinancialPeriod().getBeginDate(), @@ -552,6 +555,8 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo selectionModel.setSelectionInterval(addIndex, addIndex); table.changeSelection(addIndex, 1, false, false); table.editCellAt(addIndex, 1); + table.scrollRowToVisible(Math.max(0, addIndex - 5)); + table.scrollRowToVisible(Math.min(tableModel.size() - 1, addIndex + 5)); } catch (LockedFinancialPeriodException e) { errorHelper.showErrorMessage(t("lima.entries.add.transaction.error.lockedFinancialPeriod", e.getFinancialPeriod().getBeginDate(), -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.