branch feature/7615-2 created (now 2bbf609)
This is an automated email from the git hooks/post-receive script. New change to branch feature/7615-2 in repository observe. See http://git.codelutin.com/observe.git at 2bbf609 désélectionner les ligne avant l'insertion (refs #7615) This branch includes the following new commits: new 2bbf609 désélectionner les ligne avant l'insertion (refs #7615) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 2bbf609624f02e94edcefd60188d9cdaa0a87b13 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Nov 13 15:12:06 2015 +0100 désélectionner les ligne avant l'insertion (refs #7615) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7615-2 in repository observe. See http://git.codelutin.com/observe.git commit 2bbf609624f02e94edcefd60188d9cdaa0a87b13 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Nov 13 15:12:06 2015 +0100 désélectionner les ligne avant l'insertion (refs #7615) --- .../ui/content/impl/longline/LonglineDetailCompositionUIHandler.java | 4 ---- .../java/fr/ird/observe/ui/util/table/EditableTableModelSupport.java | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineDetailCompositionUIHandler.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineDetailCompositionUIHandler.java index 04b5730..ae13858 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineDetailCompositionUIHandler.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineDetailCompositionUIHandler.java @@ -883,7 +883,6 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong baskets.add(selectedRowIndex, newBasket); selectedSection.getBasket().clear(); selectedSection.addAllBasket(baskets); - getBasketsTableModel().setData(baskets); } finally { @@ -913,7 +912,6 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong baskets.add(selectedRowIndex, newBasket); selectedSection.getBasket().clear(); selectedSection.addAllBasket(baskets); - getBasketsTableModel().setData(baskets); } finally { @@ -995,7 +993,6 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong branchlines.add(selectedRowIndex, newBranchline); selectedBasket.getBranchline().clear(); selectedBasket.addAllBranchline(branchlines); - getBranchlinesTableModel().setData(branchlines); } finally { @@ -1025,7 +1022,6 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong branchlines.add(selectedRowIndex, newBranchline); selectedBasket.getBranchline().clear(); selectedBasket.addAllBranchline(branchlines); - getBranchlinesTableModel().setData(branchlines); } finally { diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/util/table/EditableTableModelSupport.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/util/table/EditableTableModelSupport.java index b97b049..a2bcc36 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/util/table/EditableTableModelSupport.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/util/table/EditableTableModelSupport.java @@ -215,6 +215,8 @@ public abstract class EditableTableModelSupport<E extends Serializable> extends int currentRow = getSelectedRowIndex(); + setSelectedRowIndex(-1); // clear selection + int insertRow = currentRow; if (insertRow < 0) { insertRow = 0; @@ -224,13 +226,14 @@ public abstract class EditableTableModelSupport<E extends Serializable> extends } addNewRow(insertRow, true); - } public void insertAfterSelectedRow() { int currentRow = getSelectedRowIndex(); + setSelectedRowIndex(-1); // clear selection + int insertRow = currentRow == getRowCount() ? currentRow : currentRow + 1; if (log.isInfoEnabled()) { log.info("Insert after selected row: " + currentRow + " :: " + insertRow); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
participants (1)
-
codelutin.com scm