This is an automated email from the git hooks/post-receive script. New commit to branch feature/1209 in repository lima. See http://git.chorem.org/lima.git commit 44fc638e381cb0f7f16306b5eee4fa5e7b35e6b4 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Tue Mar 31 15:26:41 2015 +0200 fixes #1209 : lors de la navigation par TAB si elle provoque l'ajout d'un ecriture ou d'un transaction ne pas changer la sélection du tableau car elle est déjà changé dans ces deux fonction d'ajout Suppression de l'edition automatique des cellules, rendre le focus à la table lors du clique sur les boutons d'action --- .../ui/financialtransaction/FinancialTransactionTable.java | 11 ++++++----- .../FinancialTransactionViewHandler.java | 13 ++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java index cae0c9c..ce6e084 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionTable.java @@ -96,13 +96,11 @@ public class FinancialTransactionTable extends FinancialTransactionDefaultTable< BigDecimal debit = transaction.getAmountDebit(); if (credit.compareTo(debit) != 0) { table.handler.addEntry(); - column = 2; - row++; + // addEntry entry change selection end = true; } else if (row >= nbRows - 1) { table.handler.addFinancialTransaction(); - column = 0; - row++; + // addFinancialTransaction change selection end = true; } else { column = 0; @@ -116,7 +114,10 @@ public class FinancialTransactionTable extends FinancialTransactionDefaultTable< column++; } } while (!end && !tableModel.isCellEditable(row,column)); - changeSelection(row, column, false, false); + + if (!end) { + changeSelection(row, column, false, false); + } } } } 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 c65b720..8eee34c 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 @@ -466,7 +466,7 @@ 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.requestFocus(); table.scrollRowToVisible(Math.max(0, index - 5)); table.scrollRowToVisible(Math.min(tableModel.size() -1 , index + transaction.sizeEntry() + 5)); } catch (LockedFinancialPeriodException e) { @@ -523,7 +523,7 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo selectionModel.setSelectionInterval(index, index); //focus on second column table.changeSelection(index, 1, false, false); - table.editCellAt(index, 1); + table.requestFocus(); } catch (LockedFinancialPeriodException e) { errorHelper.showErrorMessage(t("lima.entries.paste.entry.error.lockedFinancialPeriod", e.getFinancialPeriod().getBeginDate(), @@ -575,7 +575,7 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo selectionModel.setSelectionInterval(addIndex, addIndex); // set focus on date table.changeSelection(addIndex, 0, false, false); - table.editCellAt(addIndex, 0); + table.requestFocus(); table.scrollRowToVisible(Math.max(0, addIndex - 5)); table.scrollRowToVisible(Math.min(tableModel.size() - 1, addIndex + 5)); } catch (LockedFinancialPeriodException e) { @@ -682,7 +682,7 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo row, row); // set focus on voucher table.changeSelection(row, 1, false, false); - table.editCellAt(row, 1); + table.requestFocus(); } catch (LockedFinancialPeriodException e) { errorHelper.showErrorMessage(t("lima.entries.add.entry.error.lockedFinancialPeriod", e.getFinancialPeriod().getBeginDate(), @@ -733,7 +733,7 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo selectionModel.setSelectionInterval( indexSelectedRow, indexSelectedRow); table.changeSelection(indexSelectedRow, 1, false, false); - table.editCellAt(indexSelectedRow, 1); + table.requestFocus(); } } catch (LockedFinancialPeriodException e) { errorHelper.showErrorMessage(t("lima.entries.remove.transaction.error.lockedFinancialPeriod", @@ -778,7 +778,7 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo selectionModel.setSelectionInterval( indexSelectedRow, indexSelectedRow); table.changeSelection(indexSelectedRow, 1, false, false); - table.editCellAt(indexSelectedRow, 1); + table.requestFocus(); } } catch (LockedFinancialPeriodException e) { errorHelper.showErrorMessage(t("lima.entries.remove.entry.error.lockedFinancialPeriod", @@ -833,7 +833,6 @@ public class FinancialTransactionViewHandler implements ServiceListener, TableMo int firstRow = tableModel.indexOf(transaction); int lastRow = firstRow + transaction.sizeEntry() - 1; tableModel.fireTableRowsUpdated(firstRow, lastRow); - table.editCellAt(selectedRow, selectedColumn); } catch (LockedEntryBookException e) { errorHelper.showErrorMessage(t("lima.entries.assign.error.lockedEntryBook", e.getClosedPeriodicEntryBook().getEntryBook().getCode(), -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.